Message from JavaScript discussions

July 2018

— Great


Please does anyone have a good tutorial on how to configure fetch with authorization headers for token and how to store it in local storage??

— Thanksss

— Getify is also an amazing teacher with great knowledge. Subscribe frontendMasters and u will learn a lot, best resource for frontend courses IMO

Message permanent page

— Directly from cloud?

— Hi guys!

— Yea

— Welcome

— I need an help to understand a piece of code about prototype in JS. Someone who could help me?! : ]

— Share your code and ask your question

— Function RigidShape(center) {
this.mCenter = center;
this.mAngle = 0;

var Rectangle = function (center, width, height) {, center);
this.myType = 'Rectangle'; = center;
this.width = width;
this.height = height;

var prototype = Object.create(RigidShape.prototype);
prototype.constructor = Rectangle;
Rectangle.prototype = prototype;`

Message permanent page

— I cannot understand the last 3 rows od the code. I'm following a tutorial but I cannot get the meaning to make an object (prototype), make its constructor the Rectangles constructor and then make the prototype of the Rectangle the object prototype created

Message permanent page