Crenox

Javascript Tutorial For Beginners LearnCode.academy #2

Jun 26th, 2015
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. Here's an if statement program example:
  2. var age = 16;
  3.  
  4. if (age < 16)
  5. {
  6. alert('you can not drive')
  7. }
  8. else
  9. {
  10. alert('you can drive')
  11. }
  12.  
  13. It would alert "you can drive" because 16 is not less than 16.
  14.  
  15. An escape sequence, which is the backslash in JavaScript "\" is that whatever element is after it, it'll be treated as a String character.
Add Comment
Please, Sign In to add comment