当前位置:网站首页>How to understand JS expressions and JS statements

How to understand JS expressions and JS statements

2022-06-13 04:42:00 Dax1_

JS expression

Expression will Generate a value , It can be placed anywhere you need a value , such as , As an argument to a function call

give an example :

  • a ( A declared variable )
  • a+b ( Calculation expression )
  • function(1) ( Function return value )
  • x === y ? ‘a’ : ‘b’ ( Ternary expression )

JS sentence

Can be understood as an act , Do something

  • if(){}
  • for(){}
  • switch(){}
原网站

版权声明
本文为[Dax1_]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202280521342740.html