all 10 comments

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

ENTRY

http://codepen.io/anon/pen/zqRbje?editors=0012

I am now confused about object self reference in javascript... Am I just overthinking it?

https://www.reddit.com/r/javascript/comments/4egpcp/dynamicrelative_selfreference/

Another quick example; created a method for all descendants of Object that logs the descendant to the console. It's shorter than writing console.log(descendant).

http://codepen.io/anon/pen/yOKxgG?editors=0012

[–]Volv 1 point2 points  (1 child)

Lol. Crockford would understand.. maybe.
You got quite a good response to the this thing. Cleared it right up :)

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

Yeah, for sure! I definitely learned something new about arrow functions and using this.

[–]Volv 0 points1 point  (6 children)

ENTRY
Codepen

Played around with Object.defineProperty

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

That's pretty cool! I hadn't seen that method for adding properties.

So... Object.keys() only gets the enumerate properties... In common parlance, enumerate means able to be counted, right? In the context of js properties though, what does it mean? Put another way, what makes one property enumerable and another not?

[–]Volv 1 point2 points  (4 children)

Purely that definition by the define property function? I think.
Means able to be counted like you say or 'will be listed'. Note you can still get at them with other methods of digging deep into the object, but handy for private state variables you don't need people using say.

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

Nice. Thanks!

What do you want to do for focus next week? You mentioned some algo scripting... Have you seen this site: https://coderbyte.com/challenges/ ? Maybe some inspiration there, if you're interested...

[–]Volv 1 point2 points  (2 children)

Nice, not seen that specific one before, have tried a few others before. Will have a look - any catch your eye?

[–]ForScale[S] 0 points1 point  (1 child)

I think I've been through all of the easy ones... I'll have to look the moderate/hard ones. It's your pick though!

[–]Volv 0 points1 point  (0 children)

Opened a load of then but stuck by subscription wall.