Advertisement
Guest User

Untitled

a guest
Nov 13th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. variables:
  2. const variableName - a constant variable, once you assign a value to this variable, it can not be changed
  3. var variableName - a normal variable, its value can be changed whenever
  4. let variableName - same thing as var
  5.  
  6.  
  7.  
  8. loops:
  9. for (var x = 0; x < 5; x++) {
  10. stuff here;
  11. stuff here;
  12. }
  13.  
  14. while (expression) {
  15. stuff here;
  16. stuff here;
  17. }
  18.  
  19.  
  20.  
  21. if/else:
  22. if (condition) {
  23. stuff here;
  24. stuff here;
  25. }
  26. else if (condition) {
  27. stuff here;
  28. stuff here;
  29. }
  30. else {
  31. stuff here;
  32. stuff here;
  33. }
  34.  
  35.  
  36.  
  37. functions:
  38. function myFunction() {
  39. stuff here;
  40. return stuff;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement