May
12
1.js不支持重载,因为js里的函数都是一个对象,js里有个隐含对象Function,所有的js函数都是一个Function类型的对象。比如:
等价于
function add(number)
{
alert("hello");
}
function add(number)
{
alert("hello");
}
{
alert("hello");
}
function add(number)
{
alert("hello");
}
等价于
var add = new Function("number","alert('hello');");
var add = new Function("number","alert('hello');");
var add = new Function("number","alert('hello');");




