单项选择题
定义一个模块,里面写两个方法,分别是sayHello和sayBye,把这两个方法全部抛出,以下写法正确的是()……
定义一个模块,里面写两个方法,分别是sayHello和sayBye,把这两个方法全部抛出,以下写法正确的是()
A.define(function(){ var sayHello = function(){ alert('sayHello') } return sayHello var sayBye = function(){ alert('sayBye') } return sayBye })
B.define(function(){ var sayBye = function(){ alert('sayBye') } return sayBye var sayHello = function(){ alert('sayHello') } return sayHello })
C.define(function(){ var sayBye = function(){ alert('sayBye') } var sayHello = function(){ alert('sayHello') } return ['sayBye','sayHello'] })
D.define(function(){ var sayHello = function(){ alert('sayHello') } var sayBye = function(){ alert('sayBye') } return { sayHello:sayHello, sayBye:sayBye } })