JavaScript Lesson 1

  • console.log();
    • Data is printed, or logged, to the console. Data must be in the ().
  • comments
    • single-line //
    • multi-line /* */
  • data types
    • strings
      • characters wrapped in single or double quotes: “I love pizza” ‘apples are odd’
    • numbers
      • any number without quotes: 23.523
    • booleans
      • true or false
    • null
    • undefined
    • symbol
    • object
      • Objects including instances of data types, can have properties, stored information. The properties are denoted with a . after the name of the object: ‘Hello’.length
      • Objects, including instances of data types, can have methods which perform actions. Methods are called by appending the object or instance with a period, the method name and parentheses. ‘hello’.toUpperCase();
      • Built-in objects, including Math, are collections of methods and properties that JavaScript provides.
  • Operators
    • +, -, *, / , or %

Leave a comment