Implement the New Operator

# Introduction In this challenge, we will be implementing the `new` operator in JavaScript. The task is to encapsulate a function called `myNew` that mimics the functionality of the `new` operator. The `myNew` function takes a constructor function as its first parameter, followed by any additional parameters for the constructor function. The goal is to create an instance of the constructor function using the `new` operator-like syntax in the example provided. The implementation should replicate the behavior of the `new` operator, creating a new object and assigning it as the value of `this` inside the constructor function, as well as inheriting properties and methods from the constructor's prototype.

|60 : 00

Click the virtual machine below to start practicing