《typescript开发实战》分享提问

感谢您能抽出几分钟时间来参加本次答题,现在我们就马上开始吧!
答题者
    ____________
unknown类型是否能赋值给string类型?
不能
function fn1(): never {

  while (true) {}

这样写会报错吗?

不会
enum Direction {

    Up , 

    Down = 2,

    Left,

    Right,

}

console.log(Direction[3]) 

打印出来的值为?

A.Up
B.Down
C.Left
D.Right

4题 | 被引用0次

使用此模板创建