Programming

&

JavaScript

 

Lonce Wyse

Communication & New Media

lonce.wyse@cnm.nus.sg

General purpose languages

 

  • C, C++, Basic,  Java
  • Based on common fundamental concepts
  • JavaScript, the most pervasive language in the world

Essential Elements

  •  
  • Numbers:    7, 100,  3.1516
  •  
  • Strings:         "Hello World"
  •  
  • Operators:  
    • arithmetic:    +, -, *, /, %, ++, --
    • assignment:  =, +=, -=
    • logical :           ===, !==, <, >, <=, >=
  •  
  • Variables:       x,  y,  foo,  bar;

Essential Elements

  • Keywords for creating Variables:      
    • var x;    // historical way
      • var x=0;
    • let x;   // modern way
      • let x=0;
    • // if your 'variable' is constant
      • const x=0;

a) Running JavaScript and (later)

b) Serving our Web pages

 

Made with Slides.com