实例方法
apply(thisArg, argsArray)call(thisArg, arg, ...)bind(thisArg, arg, ...)
定义函数
- 函数声明:
function func(){} - 函数表达式:
const func = function(){} - 箭头函数:
const func = () => {}
- 函数声明存在提升
- 箭头函数没有
this, 没有原型链, 不能被new, 不能使用函数的实例方法.
内置函数
-
eval(): 字符串解析成代码执行 -
isfinite(): 是否为有限的数字 -
parseFloat(): 字符串转成浮点数 -
parseInt(): 字符串转成整数 -
encodeURI(): 编码 -
decodeURI(): 解码 -
encodeURIComponent(): 编码 -
decodeURIComponent(): 解码
Top comments (0)