new.target is a new “magical” value available in all functions, thoughin normal functions it will always be undefined. In any constructor,new.target always points at the constructor that new actuallydirectly invoked. class Parent { constructor() { if…
Each function should have a 'name' property. It can be anonymous, empty, the same as function name, or class name. For example: const foo = function(){} console.log(foo.name); //foo function(){ .. }); // name: (function*(){ .. }); // name: window.foo…