0% found this document useful (0 votes)
11 views

Placing Scripts at The Bottom of The Element Improves The Display Speed, Because Script Compilation Slows Down The Display

This document provides an overview of JavaScript including how to change HTML content using JavaScript, best practices for script placement, different types of JavaScript output, arithmetic operators, and links to additional JavaScript tutorials and references. It discusses using innerHTML to modify HTML elements, placing scripts at the bottom of the page for faster loading, using window.alert(), console.log(), and other output methods, and arithmetic operators like addition, subtraction, and modulus.

Uploaded by

TudoseVlad
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Placing Scripts at The Bottom of The Element Improves The Display Speed, Because Script Compilation Slows Down The Display

This document provides an overview of JavaScript including how to change HTML content using JavaScript, best practices for script placement, different types of JavaScript output, arithmetic operators, and links to additional JavaScript tutorials and references. It discusses using innerHTML to modify HTML elements, placing scripts at the bottom of the page for faster loading, using window.alert(), console.log(), and other output methods, and arithmetic operators like addition, subtraction, and modulus.

Uploaded by

TudoseVlad
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 2

https://www.w3schools.com/js/default.

asp
Can Change HTML Content
document.getElementById("demo").innerHTML = "Hello JavaScript";
document.getElementById('demo').innerHTML = 'Hello JavaScript';
Where To
Placing scripts at the bottom of the <body> element improves the display speed, because script
compilation slows down the display.
JavaScript Output
Using document.write() after an HTML document is loaded, will delete all existing HTML:
window.alert()
console.log()

Fixed values are called literals. Variable values are called variables.

JavaScript Arithmetic Operators

Arithmetic operators are used to perform arithmetic on numbers:

Description
Addition
Subtraction
Multiplication
Exponentiation (ES2016)
Division
Modulus (Division Remainder)
Increment
Decrement

https://www.w3schools.com/js/js_datatypes.asp
https://javascript.info/

Operator
+
-
*
**
/
%
++
--

You might also like