For this Question: We have provided you with an <code> addAndSubtract</code> object that contains <code>num1</code> and <code>num2</code> properties and <code>add()</code> and <code>subtract()</code> methods which add and subtract <code>num1</code> and <code>num2</code> respectively.
Create a <strong>calculator</strong> object that contains two functions <strong>product()</strong> and <strong>divide()</strong>. It should contain functions named the <code>product</code> and <code>divide</code> which return the product and division results of  num1 and num2 respectively that is <code>num1* num2</code> and <code>num1/num2 </code>. But num1 and num2 are not defined in the calculator object.

Inherit the <code>addAndSubtract</code> object in the <code>calculator</code> object so that it can use num1 and num2 defined in the <code>addAndSubtract</code> object.
Note:- You won't be able to test it by generating outputTakes no argumentReturn a numberconst addAndSubtract = {
    num1: 6,
    num2: 3,
    add() {
      return . . .;
    },
    subtract() {
      return . . .;
    },
}

const calculator = {
    //... your code
}

console.log(calculator.num1);  // 6
console.log(calculator.subtract()); // 3
console.log(calculator.product()); // 18

<strong>Note: Give 6 and 3 as num1 and num2 respectively in the input section separated by a comma and then run the code to check the correct output</strong>, I have written this Solution Code: const addAndSubtract = {
  num1: 6,
  num2: 3,
  add() {
    return (this.num1 + this.num2);
  },
  subtract() {
    return (this.num1 - this.num2);
  },
}

const calculator = {
  __proto__: addAndSubtract,
  product() {
    return (this.num1 * this.num2);
  },
  divide() {
    return (this.num1 / this.num2);
  }
}, In this Programming Language: JavaScript, Now tell me if this Code is compilable or not?