readingnotes

View project on GitHub

Read05

  • You can evaluate a situation by comparing one value in the script to what you expect it might to be.the result will be boolean true or false.( == equal to, != not equal to,===strict equal to, !=== strict not equal to, >grater than, < less than,>= greater than or equal to,<=less than or equal to ).

  • Logical operators allow you to compare the result of more than one compartion operator(&& logical and,   logical or,! logical not)
  • Loops check a condition. if it returns true, acode block while run. then condition will be checked again and if still returns true,the code block while run again. it repeats until the condition returns false.(for:if you need to run code specific number of times ,while: if you don’t now how many times the code should run,do while: it will always run the statments inside the curly braces at least once even if the condition evaluate to false)