So! if you can figure out.

Primeaux: Because it’s not for html strings, it’s for trees

Corporan: The resulting data looks like this: {type: ‘div’, props: {}, children: {type: ‘a’, props: {href: foo}, children: ‘hello’}}

Guire: How do you merge multiple html pages into one?

Vielma: As in, so that they will transit smoothly

Matthees: MaxG: you can’t really

Oberst: Prohobo: under localhost

Drummonds: Unless you replace the entire doc server-side

Jozsa: As in, can’t you hide it under one div and so on?

Almond: But the client still loads EVERYTHING

Shortnacy: You could, i suppose, have a server-side view that feeds templates

Ashline: And you’d replace templates in JS

Stower: As in i’m doing a big interactive board

Dodgion: So it’s fine if it’s loads everything pre hand

Rublee: I just need it to be transit smoothly

Kampe: Hi! How can I prevent the cursor to move when I press upArrow or downArrow on the keyboard?

Balletto: When inside an input=”text”

Bassette: Ive a question, as usual. I think it’s well possible to implement the function some using reduce, it should be totally doable, right?

Oelze: What is the JSDoc syntax for do***enting a parameter that only accept a predefined set of values? e.g.

Trucchi: RonRichie: You can do it with reduce, but that wouldn’t be the ideal solution, since reduce has no choice but to iterate over every item in the array. some should be able to quit after finding just one

Metoxen: Trucchi aha I realize that, the reason I need to do it because that’s what my pre-course requires me, one method should be used reduce another method should be used every to implement some :-/

Trucchi: Well, it’s definitely possible. it just does unnecessary work

Provorse: Trucchi aha, I definitely agree with you, I know reduce wont stop until looping over the entire collection is complete, but for some reason that’s what the pre-course requires mebtw, I’m working on underbar.js which is like underbar js but it has spec tests that need to be p***ed, but this looping over entire array won’t be the problem if i implement some by using every right?

Tisch: Http://***ent-a-parameter-that-accepts-a-predefined-set-of-values

Trucchi: RonRichie: well, every by definition HAS to loop over every item in the array ;-

Trucchi: Otherwise it couldn’t perform its namesake

Trucchi: Btw I’d try implementing it with “every” first

Trucchi: It’s deceptively easy

Trucchi: Like, really really easy

Delgatto: Trucchi yeah lol fair enough 😀 maybe it’s possible to stop the loop as soon as it finds an element that doesn’t p*** the test? since thats what every does huh?

Defore: Aha. im trying to do it with reduce and it doesnt come easy at all lol

Trucchi: RonRichie: Consider this: what, conceptually, is the opposite of every?

Trucchi: Not among the array methods, just in general

Voorhies: Trucchi well, yeah every returns true only if all elements in the array p*** the implemented test, and returns false if either of the elements fail it, some will p*** the test if any of the elements p*** the test. so, now, isn’t it possible to have an if statement in my some that checks a specific conditionif any element p***es the test stop the loop and return true?

Laudato: Trucchi what you think of this? do you think it works properly as it is now?

Trucchi: RonRichie: again – on a purely conceptual basis, what is the polar opposite of the word “every”?

Tenpenny: Ahh mmmm. false you mean?

Trucchi: Yeah. what would make array.none false?

Gangl: If any of the condition evaluated false?

Trucchi: Aka “any” – aka “some”

Trucchi: So! if you can figure out how to get “none” from “every”, then you can negate it to get “some”