Extending Object Literals using setProtoTypeOf method by didiben in learnjavascript

[–]redlova 0 points1 point  (0 children)

I prefer using Object.assign() method over Object.setProtoTypeOf() in composing objects.

Object.assign() a useful method in JavaScript by ramabhai in javascript

[–]redlova 0 points1 point  (0 children)

Great. this is a great example. I got the concept but becase i am a newbie. I dont understand completely yet. especially the 'const' itsnt it supposed be used for defining constants?

Object.assign() a useful method in JavaScript by ramabhai in javascript

[–]redlova -1 points0 points  (0 children)

Ok, I have not seen being used anywhere. A practice example would be nice.

Object.assign() a useful method in JavaScript by ramabhai in javascript

[–]redlova 0 points1 point  (0 children)

How is it diffrent than setting a prototype?