Object literals make it easy to quickly create objects with properties inside the curly braces. To create an object, we simply notate a list of key...
For further actions, you may consider blocking this person and/or reporting abuse
Thank you Sarah, I Liked it
typo:
think u meant to write es6 and not 5 in:
"
...
//ES5
function getLaptop(make, model, year) {
return{
sayModel() {
return model;
....
"
Thank you for the correction. 😊
hey Sarah,
don't you think it's time you should update this informative article with functioning of 'this'
keyword inside new es6 method declaration inside objects.
Thanks! It was a great read!
You could throw in a count, and the name, in case you want to iterate by index.
{
[name + ++i]: "Apple",
[name + ++i]: "Dell",
[name + ++i]: "HP",
count: i,
name
}
Thank you, Sarah
Good reading
thanks sarah
awesome post. Really really explanatory . Good examples that further explain the concepts discussed . Excellent !
Thank you so much
Thanks Sarah for sharing such a good stuff..
I liked it but i did not get the advantage of computed properties. It looks weird to me :(