javascript


Null: Javascript中的关键字,它表示一个特殊值。通常用来描述“空值”。
undefined: 表示值得空缺。它是变量的一种取值,表示变量未进行初始化(变量没有赋值),在EcmaScript3中,undefined是可读写的变量,可以给它负任何值。在EcmaScript5中将这个错误进行了修改。只有undefined这一个值。
作用域
当变量定义在一个函数中时,变量就在局部作用域中,而定义在函数之外的变量则从属于全局作用域。每个函数在调用的时候会创建一个新的作用域。






every() some() filter()方法-----测试每个元素
every()和some()方法 ,都是测试方法。
every():只有数组中所有的元素都通过了函数中的测试,every()方法才能是true.
some():只要数组中的一些元素通过了函数的测试,some()方法就能返回true
math对象
1.abs()方法返回所传入值的绝对值(实际上它返回该参数正值)例如:
var myNumber=-101;
document.write(Math)
网友评论