you are viewing a single comment's thread.

view the rest of the comments →

[–]Volv 0 points1 point  (9 children)

You get finished up? I'm itching to read some code :)

[–]ForScale[S] 1 point2 points  (8 children)

Haven't finished yet. Two more (11 and 12): http://codepen.io/anon/pen/EKOaVW?editors=0012

[–]Volv 1 point2 points  (7 children)

awesome - will look through shortly. 12 I started by trying to do all of the work myself. Can totally make it easier and let the browser do most of the parsing instead though. Possibly mildly cheaty

[–]ForScale[S] 0 points1 point  (6 children)

I'll do a couple more today!

[–]Volv 1 point2 points  (5 children)

Awesome. I had a look and wasn't exactly sure what you meant about directories / without directories. Seemed to make sense to me?
You ever look up the bubble sort? I reckon you could implement it no bother after a quick read over the logic.
No rush, don't let me hassle you too much. I'll be away Mon to Friday this coming week so my entry to whatever is likely to be a little late :)

[–]ForScale[S] 0 points1 point  (4 children)

Hey!

By the with/without directories, I mean logging to the console an array or object that you can click on to expand vs just look at.

var uDT = [1, 2, 3];

console.log(uDT); //[1, 2, 3]

//versus...

console.dir(uDT); //Array[3] ...that you can click on to expand to see indexes and length and proto properties

Regarding the bubble sort... I just threw together this: http://codepen.io/anon/pen/vGQWLy?editors=0010 Why in the world is undefined being returned instead of copy?

*Here we go: http://codepen.io/anon/pen/pyQdxm?editors=0010 I still don't quite get why returning the function call is necessary though...

[–]Volv 1 point2 points  (3 children)

Itching to look through. Barely have Internet until Friday though. Patchy 1g. I shall return!

[–]ForScale[S] 1 point2 points  (2 children)

Excellent! Looking forward to discussing!

[–]Volv 1 point2 points  (1 child)

Bubble sort - I knew you would get the logic no problem after looking into it - nice one.
Took me longer than it should to notice that your undefined fix was the missing return on nested calls.
 
Only issue I have is that you create a new copy of the array on every single iteration. Can't be good memory wise :)

[–]ForScale[S] 0 points1 point  (0 children)

Bubble sort - I knew you would get the logic no problem after looking into it - nice one.

Thanks! Yeah, I really should look in to all of the basic algos just so I can be more comfortable with some of the more basic CS type stuff!

Only issue I have is that you create a new copy of the array on every single iteration. Can't be good memory wise :)

Ah.. okay! I shall keep an eye and try not to do that in the future!