canzhen

if...else if...else 语句
if 语句后面可以跟 elseif…else 语句,这种语句可以检测到多种可能的情况。

使用 if,else if,else 语句的时候,需要注意下面几点:

if 语句至少有 1 个 else 语句,else 语句在所有的 elseif 语句之后。

if 语句可以有若干个 elseif 语句,它们必须在 else 语句之前。

一旦其中一个else if 语句检测为 true,其他的 else if 以及 else 语句都将跳过执行。

分类:

技术点:

相关文章:

  • 2021-05-25
  • 2021-06-26
  • 2022-12-23
  • 2021-11-29
  • 2021-12-12
  • 2021-11-29
  • 2021-11-29
  • 2021-11-03
猜你喜欢
  • 2021-11-29
  • 2021-11-25
  • 2021-11-29
  • 2021-11-29
  • 2021-11-29
  • 2021-12-22
  • 2021-11-29
相关资源
相似解决方案