Normally with Object literal we mostly encapsulate the member variables with the Object Literal. e.g. var Ninja = { name:"Crystal", belt: "Black", show: function() { console.log(`${this.name} attained ${this.belt} belt`); } }; Ninja.show(); So to get a bit of encapsulation. For understanding what do you think the difference in both approaches and how ES6 might be better?
In this playlist #8 goes before #7.Btw awesome tutorials!
i think the playlist was reviewed...when i checked in and downloaded the videos about a week ago...
it was cool...
Nice work netninja
2 years by and the playlist still has the same error lol.
@@loot6 dude it is 2019 :)
@@fffhshf345 That's even worse then
@@loot6 damn its 2020 ,, got the same error! :|
Awesome Series...Also, that "Whoah!!!" gets me everytime lol
Line 13 should be ninja.chop(5); otherwise we get undefined for console.log-ging the calling of fn chop() :)
You are correct :). Thanks!
Man i was hoping the comments section had an explanation for the undefined. Thank you!
Good catch!
Thanks Fionna to clarify
nice work man you should talk about prototype too
always force me to put like for your videos
Normally with Object literal we mostly encapsulate the member variables with the Object Literal. e.g.
var Ninja = {
name:"Crystal",
belt: "Black",
show: function() {
console.log(`${this.name} attained ${this.belt} belt`);
}
};
Ninja.show();
So to get a bit of encapsulation. For understanding what do you think the difference in both approaches and how ES6 might be better?
hi is there any github link you save these codes there?tnx