May 23, 2025
x with a value of 7.getName that calls console.log(x).7.getName() prints 7.x without setting a value, you'll get an "undefined" error.getName is a function, but if converted to an arrow function, it will behave like a variable.