Eclipse的Jar包解压出System.js里String与Boolean定义分号可有可无吗?

本文探讨了Eclipse内置system.js文件中String、Number、Boolean和Date构造函数声明后的分号使用差异,并提供了相关源码链接。

org.eclipse.wst.jsdt.core_1.3.300.v201410221502\libraries\system.js
/**
* Object String()
* @constructor
* @extends Object
* @since Standard ECMA-262 3rd. Edition
* @since Level 2 Document Object Model Core Definition.
*/
function String(){}
String.prototype = new Object();

/**
* Object Number()
* @constructor
* @extends Object
* @since Standard ECMA-262 3rd. Edition
* @since Level 2 Document Object Model Core Definition.
*/
function Number(){}
Number.prototype = new Object();

/**
* Object Boolean()
* @constructor
* @extends Object
* @since Standard ECMA-262 3rd. Edition
* @since Level 2 Document Object Model Core Definition. 
*/
function Boolean(){};
Boolean.prototype = new Object();

/**
* Object Date(s)
* @constructor
* @param {String} s
* @extends Object
* @since Standard ECMA-262 3rd. Edition
* @since Level 2 Document Object Model Core Definition. 
*/
function Date(s){};
Date.prototype = new Object();

Boolean和Date声明后的大括号后有分号,而String和Number却没有?这是为毛?
这可是从Eclipse带的jar包里解压出来的system.js文件。

源码:http://files.cnblogs.com/files/rgqancy/JavaScript.zip

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值