js中可以使用Function创建函数

var func=new Function();

这个对象可以将字符串转换为函数

var func=new Function("console.write('hello world')");

func();

函数中有内置的arguments变量,根据这个变量可以获取到函数传递过来的所有参数;这就使我们可以使用可变参数列表的函数;

function test(){

  for(var i=0;i<arguments.length;i++){

    console.write(argument[i]);

  }

}

test(1,2,3,4);

instanceof 关键字的使用方法;判断构造函数是否存在于对象的原型链上;

function Person(){};

var p=new Person();

console.write(p instanceof Person);//true;

console.write(p instanceof Object);//true;

最新文章

  1. html学习第三天—— 第11章 盒子模型 div
  2. 使用jquery修改css中带有!important的样式属性
  3. my Highcharts
  4. VB 进制转换大全
  5. Delphi对于控件的SuperClassing(封装并扩展Button,使之变成TButton)
  6. 50道经典的JAVA编程题(汇总)
  7. 深入浅出 JavaScript 数组 v0.5
  8. SQL Server日期时间格式转换字符串详解
  9. Android SimpleAdapter源码详解
  10. VMware网络配置 实现与物理机互访
  11. 智能家居项目(3):编译工具makefile
  12. xml的xPath解析规则
  13. PS调出韩式米黄色室内婚纱照片
  14. mininet的学习之一
  15. html5 - Storage 本地存储
  16. linux学习笔记之 basename, dirname
  17. Guide to Porting MetaMask to a New Environment
  18. P&#183;C&#183;L 了解
  19. DOS命令大全(二)
  20. Android 实现透明效果的 Activity

热门文章

  1. 1.5 select编写
  2. change the version of python on my centos
  3. linux 清理几天前的日志或文件
  4. error: ‘module’ object has no attribute ‘_rebuild_tensor_v2’
  5. 机器学习笔记(四)Logistic回归模型实现
  6. linux之正则
  7. 最常用的JavaScript类的定义
  8. Linux系统上安装、卸载JAVA、TOMCAT的方法
  9. 关于实时监听input的值得变化的问题
  10. [转载]Fiddler 解析!抓包抓得好真的可以为所欲为 [一]