What is the logic behind 42..toString()
with ..
?
The double dot works and returns the string "42"
, whereas 42.toString()
with a single dot fails.
Similarly, 42...toString()
with three dots also fails.
Can anyone explain this behavior?
console.log(42..toString());
console.log(42.toString());