1.默认参数
var str = "hello world";function http(method='get'){ //methodconsole.log(method);}http();http('post') //method='post'
function http(method:string='get'):void{console.log(method);}http();http('post')
2.可选参数
function getInfo(name:string,age?:number):void{console.log(name+age);}getInfo('Nihao')
