View on GitHub

reading-notes

JavaScript

What is JavaScript?
is a scripting language that enables you to create dynamically updating content, control multimedia, animate images, and pretty much everything else.

Where to write JavaScript?
there are two ways to write JavaScript:

  1. inside the html
  2. in a seperate file, by linking the JavaScript file in the html file <script src “filename.js”></script>.

*better to put the script in the end of the body.

syntax

as any other programming language there is a set of rules for typing the code.

data types

you can know the data type throgh the typeof() operator.

you can also add to the html ex: document.write(“”)