【JS】Beginner3 & 4 & 5 & 6:Maths & Logic & Conditonal & Looping

1.number

operator () * / + -

2.logic make decisions in code

compare values to produce a boolean value

===(同类型)  !==  >  <

combined >= <=

3.Conditional

if else

//注释 indicate comment

If some logic(the contion)is true,run a {block} of code

Condition is not true ,ignore if block ,only the else block will be run

Used to run an alternative piece of code.

4.Looping

while for

Repeating the same block of code over and over again until the conditional is no longer true ,or until you force them to stop.

Eg,carry out an action on every item in an array.

上一篇:VUE 实现复制内容到剪贴板功能


下一篇:javascript 将内容复制到剪贴板