函数类型

数据类型

1.原始类型
number string boolean underfined null
js
‘’’
console.log(123, typeof 123);
console.log(“php”, typeof “php”);
console.log(true, typeof true);
console.log(undefined, typeof undefined);
console.log(null, typeof null);

‘’’
2.引用类型
array object function
2.1 array
js
‘’’
const arr = [“手机”, 2, 5000];
console.log(arr);
console.log(arr[0]);
console.log(arr[1]);
console.log(arr[2]);
console.log(typeof arr);
console.log(Array.isArray(arr));
‘’’
2.2 object
js
‘’’
console.log(123, typeof 123);
console.log(“php”, typeof “php”);
console.log(true, typeof true);
console.log(undefined, typeof undefined);
console.log(null, typeof null);
‘’’
2.3 function
2.3.1 value
js
‘’’
function f2() {
let a = 1;
return function () {
return a++;
};
}
console.log(f2());
const f = f2();
console.log(f());
console.log(f());
console.log(f());
console.log(f());
console.log(f());
console.log(f());
‘’’
2.3.2 object
js
‘’’
function f1(callback) {
console.log(callback());
}
f1(function () {
return “hell 朱老师”;
});
‘’’

更多相关文章

  1. mysql取得datetime类型的数据,后面会跟个.0的实现方法
  2. MySQL中Decimal类型和Float Double的区别(详解)
  3. MySQL中的数据类型binary和varbinary详解
  4. 关于EditText
  5. 详解MySQL数据类型DECIMAL(N,M)中N和M分别表示的含义
  6. MySQL数据类型中DECIMAL的用法实例详解
  7. MySQL操作之JSON数据类型操作详解
  8. 解析MySQL中存储时间日期类型的选择问题
  9. MySQL5.7 JSON类型使用详解

随机推荐

  1. mysql数据库监控利器lepus天兔工具安装和
  2. Mysql主从复制读写分离
  3. MySQL查询返回用户的收件人列表
  4. linux系统下安装多个MySql数据库并做主从
  5. 在MySQL中盲目使用INSERT是否有缺点?
  6. 如何在列中搜索值,并在单个SQL查询中获取
  7. 最近用php写了一个从mysql数据库随机读取
  8. 创造一个多态关系与教义
  9. mysql中 character set 和collation关系
  10. Simple MySQL-C ORM - 简化C语言访问MySQ