console.log(123['toString'].length);
why this code returns value: 1 ?
Any good explanation?
>Solution :
Because in javascript the length of a function is the number of named arguments it accepts.
Your 123['toString'] returns the toString method of numbers which accepts a radix parameter (see Number.prototype.toString), so that is what 1 is for.