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.
- JavaScript is the programming language for the web
- It is used for funcionality
- For interaction with the user.
Where to write JavaScript?
there are two ways to write JavaScript:
- inside the html
- 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
- numbers
- string
- boolean
- undefined
- null
- object.
you can know the data type throgh the typeof() operator.
you can also add to the html ex: document.write(“”)