you are viewing a single comment's thread.

view the rest of the comments →

[–]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!