Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JS in 20 minutes

JS in 20 minutes

JS in 20 minutes // Smena Station Sri Lanka Edition 2022

Avatar for Dmitrii Volykhin

Dmitrii Volykhin

December 27, 2021

Other Decks in Technology

Transcript

  1. • Why Javascript? • What is Javascript? • What can

    you do with it? • Where is Javascript code run? Agenda
  2. Variables • We use variables to store data temporary •

    let a = 1; • cannot be reserved word • should be meaningful • cannot start with number (1a) • cannot contain a space or hyper • are case sensitive • let fi rstName = ‘John’; • (const, var) - SOON
  3. Primitive Types • let name = ‘Josh’; // String Literal

    • let age = 30; // Number Literal • let isApproved = true; // Boolean Literal true/false • let fi rstName = unde fi ned; • let color = null;
  4. Dynamic Typing let name = ‘Josh’; // String Literal let

    age = 30; // Number Literal let isApproved = true; // Boolean Literal true/false let fi rstName = unde fi ned; let color = null; typeof name
  5. Objects • let p = {a: 1, b: 2}; •

    dot notation/bracket notation • p.a = 1; • p[‘a’] = 1;