Agenda
Intro to JavaScript
JavaScript Syntax: types, variables, operators
Logical Structure Syntax
Arrays
Overview | External JavaScript | Types | Operators | Structures | Arrays | Worksheet
Intro to JavaScript
What is JavaScript?
An Introduction to JavaScript
What is JavaScript? - Learn web development | MDN
ECMA-262 - Ecma International
Basic JavaScript Syntax
Syntax Characteristics
- statements end in a semi-colon
- braces used to enclose blocks (e.g. if/loop blocks, function/method blocks, object blocks)
- indentation doesn’t matter for syntax, but it IS an industry standard
- // end of line comments
- like # in python
- same // as java
- /* multi-line
comments
*/
- like ‘’’ or “”” in python
- same /* */ in java
- has variables and constants
- has logical structures e.g. selections, iteration
- has data structures e.g. arrays/maps and objects/classes