Quiz Tips

Quiz Tips

Happy Web Dev

The Diameter is a regular function, while Perimeter is an arrow function.

In arrow functions, the this value points to the surrounding scope, unlike ordinary functions.

This means that when Perimeter is called, the value of this in this function does not point to the shape object, but to the external scope (for example, window)




Report Page