What is the value of x in the following code?
class Calculator {
constructor() {
this.value = 10;
}
add(x) {
return this.value + x;
}
}
const calc = new Calculator();
const x = calc.add(5);
What is the value of x in the following code?
class Calculator {
constructor() {
this.value = 10;
}
add(x) {
return this.value + x;
}
}
const calc = new Calculator();
const x = calc.add(5);