惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
博客园 - 聂微东
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MyScale Blog
MyScale Blog
罗磊的独立博客
H
Help Net Security
L
LangChain Blog
T
Threat Research - Cisco Blogs
量子位
S
Securelist
Last Week in AI
Last Week in AI
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
The Hacker News
The Hacker News
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
T
Threatpost
Security Latest
Security Latest
P
Palo Alto Networks Blog
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
F
Full Disclosure
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Heimdal Security Blog
J
Java Code Geeks
Recorded Future
Recorded Future
Hugging Face - Blog
Hugging Face - Blog
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
B
Blog RSS Feed
月光博客
月光博客
C
Cisco Blogs
V
Visual Studio Blog
D
DataBreaches.Net
H
Hacker News: Front Page
博客园 - 叶小钗
N
News and Events Feed by Topic
爱范儿
爱范儿
A
Arctic Wolf

博客园 - leavingme

从 Google Code 迁移代码到 GitHub 上 ActionScript 3 Socket 安装 VirtualBox Guest Additions 后 Windows XP 分辨率问题 Xcode 4.5的几个问题 Backbone.js WebGL Relearn jQuery 关闭脚本运行慢的提示 理解使用 JavaScript 构建 Metro 应用 iOS RSA相关资料 CommonJS 网站地图 Apache Ant & YUI Builder html5 manifest ie6下动态更改img.src 图片不显示 ApacheBench 锚点 空白的iframe 中文正则
Function
leavingme · 2012-10-03 · via 博客园 - leavingme

http://www.w3school.com.cn/js/pro_js_functions_function_object.asp

https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function

概述

在JavaScript里,所有的function实际上都是Function对象。

语法

var function_name = new Function([arg1[, arg2[, ... argN]],] functionBody);

参数

arg1, arg2, ... argN

每个都对应于有效的JavaScript标识符或用逗号分隔的字符串列表,比如:“x”,“theValue”,或“a, b”。

functionBody

该字符串包含JavaScript语句组成的函数定义。

描述

Function 对象创建于 Function 构造器被解析当function被创建时。效率低于直接定义function和从你的代码中调用。

因为函数定义于函数语句被解析。

所有的参数传递给函数作为标识符的名字。按照这个顺序传递。

函数通过Function构造器创建。不要创建闭包来创建上下文。他们总是运行在window上下文。

调用Function构造器象function一样(不使用new操作符),有同样的效果象调用Function构造器一样。

例子

通过Function构造器创建函数是动态创建不定数量对象通过一些执行脚本创建全局域的方法之一。

new Function('return {"a": 1}');