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

Javascript: Statements

JavaScript is a case-sensitive language where statements are commands for the browser to execute, such as writing text to a web page. Statements normally end with semicolons, though they are optional, and multiple statements can be written on one line when semicolons are used.

Uploaded by

Zayaan Rnb
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Javascript: Statements

JavaScript is a case-sensitive language where statements are commands for the browser to execute, such as writing text to a web page. Statements normally end with semicolons, though they are optional, and multiple statements can be written on one line when semicolons are used.

Uploaded by

Zayaan Rnb
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

JavaScript Statements

Previous Next Chapter


JavaScript is a sequence of statements to be executed by the browser.

JavaScript is Case Sensitive JavaScript Statements

Unlike HTML, JavaScript is case sensitive - therefore watch your capitalization closely when you write JavaScript statements, create or call variables, objects and functions. A JavaScript statement is a command to a browser. The purpose of the command is to tell the browser what to do. This JavaScript statement tells the browser to write "Hello Dolly" to the web page:

document.write("Hello Dolly");
It is normal to add a semicolon at the end of each executable statement. Most people think this is a good programming practice, and most often you will see this in JavaScript examples on the web. The semicolon is optional (according to the JavaScript standard), and the browser is supposed to interpret the end of the line as the end of the statement. Because of this you will often see examples without the semicolon at the end. Note: Using semicolons makes it possible to write multiple statements on one line.

You might also like