《typescript学习》- 函数的默认参数

176 阅读1分钟
function log3(x: string, y: string = 'World') {
  console.log(x, y)
}

log3('Jack')