函数1
2
3
4function say():string {
// 返回字符串
return "Hello";
}
1 | function tell():number { |
1 | function empty():void { |
1 | function add (x:number, y:number):string { |
1 | var myAddts:(name:string, age:number)=>number=function(n:string, a:number):number { |
1 | function buildName(firstName:string, lastName:string) { |
1 | function buildName(firstName?:string, lastName?:string) { |
1 | // 指定默认值 |