Switch必须赋初始值,值与每个case值匹配。这句话中的“赋初始值”是什么意思?
check
check 2016-12-21 10:46:20
0
2
977
check
check

reply all(2)
数据分析师

Switch must be assigned an initial value, and the value matches each case value. What does "assign an initial value" mean in this sentence? -PHP Chinese website Q&A-Switch must be assigned an initial value, and the value matches each case value. What does "assign an initial value" mean in this sentence? -PHP Chinese website Q&A

Please watch and learn.

迷茫

注意语法:x 就是需要赋初始值的变量,只有该值被赋值后,后面的case代码块才能根据其值执行相应的代码内容

switch(x){

case x值1:

执行的代码块1;

break;

case x值2:

执行的代码块2;

break;


Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template