Hmm. so I want to create.

Glomski: Maybe start by reading the goddamn spec.

Mustoe: Baxx: so I can just add script …. /script at the bottom of the page?

Kovich: SmashingX: yeah, it loads sequentially

Marcelino: Bex lol, maybe I should go with that

Cantoran: Glomski: If I declare a variable outside of a function It should be in the Global space, and I should be able to use it within the function – is that correct?

Muratalla: My cute little reduce Ive got done for my homework 3,console she’s pretty right?

Glomski: Baxx: Sure. I’m kinda drunk at this moment, but your ***umption seems to be correct. Closures and ****.

Bendixen: AramKaram, you’re mutating collection

Gubser: Glomski: does everything look like it’s in italics?

Glomski: Baxx: Not yet, but it’s certainly getting there.

Glomski: Interesting question.

Shoaf: Is there any way this function can be reduced?

Anhorn: Terrone yeah know that, this just how they wanted it, they know this isnt what you’d usually want to do, it’s just a homework, im sure in practice they’d want me to return a new array insteadthough reduce doesn’t return one but you got what I mean :

Maleh: AramKaram, but if you called it twice it’d give different results :/

Turrubiartes: It’s completely wrong

Glomski: Jesus ****ing christ, man. That function.

Janner: More cases would be nice

Arriaga: Terrone: the function must maintain the same input and output

Glomski: It could hide the Loch Ness Monster.

Bennette: Terrone lol if there is only value leftsince thats what reduce does why would you call it again one a single value? and reduce doesn’t return an array, so you can’t run again on the returned result lol

Mckay: Terrone: are you sure that works ?

Depolito: I dont know if i can come up with sufficient test cases

Glomski: Wasn’t there Numbers in that switch, as well? Won’t do it. But it’s a good start.

Boria: AramKaram,,console

Glomski: No there wasn’t. So it’d work. 😛

Heitger: Terrone ah I see lol but I cant tell why that happens tho :-/

Roskos: AramKaram, mutates the array

Suttin: And d2 for the others?

Midgett: Terrone ahhh right! 😀

Falter: Suttin is that about me ?:-/

Chisom: Suttin I thought you were refereeing to me that question above

Alpheaus: So re scope – I’m not too sure why this is working how it is

Papakostas: I would have expected to be able to define that outside of the function

Grett: Baxx, if you define it outside the function it’s only created once

Sherburn: Terrone: right, so it ceases to exist on the next frame?

Hebb: So if width/height/direction change, it’s never updated to match them; and whatever c.update does happens on the same instance every time

Feiteira: Baxx, it always exists when it’s defined outside the function

Cabreros: Right. so in this case it would be better to create another instance each time and let the old one die

Easterwood: No idea, depends on what you’re doing

Hakala: Fair, well I want to be able to see it so I’ll go with making it every time for now

Cumbaa: Terrone ahh how can I take care of this part then? would you give me the logic and I’ll try to execute it? basically I know a way to tell interpreter to ignore the first element of array if ac***ulator isn’t supplied right?

Riesenberg: Maybe I should make a shallow copy of that array before shifting? would that be a wise solution tho?

Arand: Things = things.slice1

Pierzchala: Hmm. so I want to create this particle variable and then update the value of the x,y within the particle cl***, if I create it within the update function then I’m going to be initialising it each time, I’m a bit confused here. I feel as though I should be createing it outside the function once then referencing it within the function and calling particle.update there, but when I do that I can’t see it.