Django_: you can use .map.

Trucchi: Silverstick: what exactly are you getting as undefined?

Eastham: Trucchi: I think I found the root but I don’t know the cause. Request.send is undefined at the point inside the send request but the Request is an object with a function of send at that point

Forshey: Tejasmanohar: particularly, I find better. “foo bar” is too error prone

Lehneis: Trucchi: so Request.send is undefined, Request.send is a function

Birden: Ohhh that’s a neat method, Sorella

Mooser: But in node where i manage the environment, why is it error prone?

Modeste: Trucchi: but according to the chrome debugger Request.send never actually gets called

Tseng: Tejasmanohar: because text editors usually don’t show you when you have trailing whitespace. So it’s very easy for some text editing operation to put some hard-to-notice whitespace after the “” token, which would cause a syntax error

Lempicki: I have a plugin for that. but yeah other people

Trucchi: Detommaso: may want to inspect/log Request within that function to see what’s in there

Hilsenbeck: Trucchi has confided me that they actually did it on purpose. How mean of them!

Trucchi: Hmm that DOES sound like me

Leary: Trucchi: I should have realized return cannot be on its own line.

Weightman: So send is correctly being caleld now

Trucchi: I totally missed that too

Trucchi: My eyes just skipped right over it

Delusia: Trucchi: damn I am doign it in like 10 places. stupid php and javascript crap

Lean: Thanks for helping me talk through it

Pelow: Is it a bad idea to name a JSON key new

Rahama: Since tha’ts a js keyword

Newsam: But it also is a json key

Nasalroad: Var o = {“new”: 1};

Adkin: You can’t do things like const { new } = o; now

Nasalroad: You can’t do var ☃ = 1;

Kowallis: Hey there! someone could help please? what’s wrong with my little cute dupFree function? :-/

Nasalroad: RonRichie, your indexOf check if the element of the current collection is inside the current collection

Nasalroad: RonRichie, you need to check if it’s not after the current element

Wotring: Nasalroad ahhh I probably need to do !== hah?

Nasalroad: RonRichie, no you need to check after the current index

Nasalroad: Habitually indexOf have two args, search item and the index

Reczek: Nasalroad aha, so does mine? it takes the collection, and the item we looking up, but I still can’t tell what I’m doing wrong :

Nasalroad: RonRichie, no you only have the target

Desantis: In js, if i do var x = ; can i do x.push more items?

Nasalroad: RonRichie, if you have an array 1,2,3, you pick 1, then you check if 1 is inside 1,2,3, of course it is, it’s the same array, so indexOf returns 0, and you reject it right now

Nasalroad: If you pick 1, you need to check every index that is not the current index, “0”

Jeffrey: Nasalroad aha, thats exactly my logic that goes into making this happen, but im just missing on something simple that can’t think of, thats how I imagined as whole this should run

Delillo: Ahhh it makes more sense now, let me try figure out if I sense it right

Poirer: Nasalroad fixed it! : thanks for guiding me through, I just realized I was p***ing a wrong array to my each inside of indexOf now it works properly :

Braasch: If I have an array of strings can I use .split to get a new array?

Trucchi: Tejasmanohar: I typically just use “create” instead

Trucchi: Django_: no, “split” is a function on the String.prototype – what are you trying to do with your array of strings, specifically?

Trucchi: Django_: you can use .map to create a new array with processed values of the original array