About this course

What you'll learn

What is JavaScript?

Why study JavaScript?

JS can change Html content and styles

JS can change Html attributes values

JS can hide Html elements and can show Html elements

Where to

The script tag

Functions and events

External JavaScript and References

Output

Using innerHtml and document. write()

Using window.alert() and console.log()

Statements

Semicolons

Line length and Line break

Code blocks

Syntax

Literals and Variables

Operators and Expressions

Keywords and Comments

JavaScript is case sensitive

Comments

Single-line and Multi-line comments

Using comments to prevent execution

Variables

Much like algebra

Data types

Declaring and Re-declaring JavaScript variables

One statement, many variables

Value = undefined

Arithmetic

Operators

Assignment and String operators

Adding strings and number

Arithmetic/Assignment

Operators and operands

Operator precedence

Assignment operators

Data types

The concept of data types

Types are dynamic

Strings and Numbers

Booleans and Arrays

Objects and Undefined

The type of operator

Empty values and Nulls

Difference between undefined and null

Primitive and Complex data

Functions

Function return

Why functions?

The () operators invokes the function

Functions used as variables values

Local variables

Objects

Object definition

Accessing object properties and Object method

HTML events

String

String length

Special characters

Breaking long code lines

Strings can be objects

Finding and Searching string is string

The Slice(), Substr() and Substring() method

Replacing string content

Converting upper and lowercase

The contact() method

Numbers

Adding numbers and strings

Numeric strings

NAN - not a number

Infinity

Hexadecimal

Numbers can be objects

The toString() and toExponsional() method

The toFixed() and toPrecision() method

The valueOf() and number() method

Arrays

Array method

Array sort

Array iteration

Dates

Date formats

Date get methods and set methods

Math

Math object

Random

Booleans

The Boolean() function

Comparisons and Conditions

Switch

The JavaScript switch statement

Loop for and while

Break

Type conversation

The typeOf operators

Converting number to string and Boolean to string

Bitwise

RegExp

Using string search() with a string and replace() with a string

Using test() and exec()

Errors

Errors will happen

Input validation

References error and Syntax error

Scope

Local and Global JavaScript variables

Declarations are Hoisted

Strict mode

Declaring strict mode

Future proof

this keyword

this in a method and this in a function

Object method binding

Let

Global and Function scope

Global variable in Html

Hoisting

Const

ECMA script 2015

Debugging

Style guide

Best practices

Never declare number, strings or Boolean objects

Beware of automatic type conversions

Use parameter defaults