We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
caller 这个属性中保存着调用当前函数的函数的引用,如果是在全局作用域中调用当前函数,它的值为null
function的length属性表示function的形参个数
每个函数都包含两个非继承而来的方法:call(),apply()
Object构造函数会像工厂方法一样,根据传入的值的类型返回相应基本包装类型的实例
let a = new Object(123) let b = new Object('123') console.log(Object.prototype.toString.call(a)); // [object Number] console.log(Object.prototype.toString.call(b)); // [object String]
number的toString方法传递一个表示基数的参数,告诉它返回几进制的字符串
let num = 10 num.toString() // "10" num.toString(2) // "1010" num.toString(8) // "12" num.toString(10) // "10" num.toString(16) // "a"
toFixed()按指定小数位返回数值的字符串,少于小数位会补0,多于小数位会舍入
toExponential()返回科学计数法,指数方式
toPrecision()会返回一个数值的最合适的格式
The text was updated successfully, but these errors were encountered:
No branches or pull requests
caller
这个属性中保存着调用当前函数的函数的引用,如果是在全局作用域中调用当前函数,它的值为null
function的length属性表示function的形参个数
每个函数都包含两个非继承而来的方法:call(),apply()
Object构造函数会像工厂方法一样,根据传入的值的类型返回相应基本包装类型的实例
Number
number的toString方法传递一个表示基数的参数,告诉它返回几进制的字符串
toFixed()按指定小数位返回数值的字符串,少于小数位会补0,多于小数位会舍入
toExponential()返回科学计数法,指数方式
toPrecision()会返回一个数值的最合适的格式
The text was updated successfully, but these errors were encountered: