React

General notes

  • In Google Chrome: click on view –> Developer –> JavaScript Console:
    • Type alert('one'); # press SHIFT + Enter
    • Then type alert('two'); # press enter
  • Another way is:
    • to click source –> click on “»” –> select Snipes –> “New Snipe”
    • clickk on the botton play button or prees Command + enter
  • Prompts:
    • on the developer tools –> Console:
    • var a=prompt("type a number");
    • alert("your number is "+a)
  • Comments –> use // and /* */

Functions:

  • function name(args) { code; return var; }
  • typeof(‘asdf’); # will return string

References