switch case的作用域
摘要:在switch case中定义变量报错,例如: let num = 1 switch(num){ case 1: let a = 1 break default: console.log(a) //1 } 再例如 switch(num){ case 1: let a = 1 break case 2
阅读全文
posted @ 2020-11-12 15:03
posted @ 2020-11-12 15:03