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
The text was updated successfully, but these errors were encountered:
/* 函数 0. 函数的功能 代码复用、模块化 事件处理 1. 函数的声明 function关键字 声明 作用域为全局 function 函数名(参数){ 函数体 } 函数表达式声明 作用域为声明语句之后 var 函数名=匿名函数声明 2. 参数 参数类型不定 实参如果少于形参,返回undefined 实参如果多于形参,多余的自动忽略 参数的默认值 不定参数个数的函数 arguments对象 length 属性 arguments[0] arguments.callee 3. 匿名函数 4. 箭头函数 (参数1, 参数2, …, 参数N) => { 函数声明 } (参数1, 参数2, …, 参数N) => 表达式(单一) //相当于:(参数1, 参数2, …, 参数N) =>{ return 表达式; } // 当只有一个参数时,圆括号是可选的: (单一参数) => {函数声明} 单一参数 => {函数声明} // 没有参数的函数应该写成一对圆括号。 () => {函数声明} 5. IIFE 声明与调用合一 普通做法 var a=function(){ } a(); 冒险做法,会报错 function(){ }() 需要把匿名函数也包起来(匿名函数)() (function(){ })() * */
Sorry, something went wrong.
No branches or pull requests
函数资源
函数案例
The text was updated successfully, but these errors were encountered: