Wednesday, January 29, 2014

JavaScript

  • Modulo Operator: The modulo operator is used with the percentage character (%) and results in the remainder of two numbers. 30 % 7 = 2
  • Substring(): allows the user to show only a section of a string. "example".substring(3, 6) would result in mpl
  • Variables: Variables are used to save values with a name like var myAge = 4; so now the number 4 is pegged to myAge
  • Var: used to declare variables var myAge = 4;

No comments:

Post a Comment