Mouse Events

A mouse event is triggered when the user click some element, move the mouse pointer over an element, etc. Here’re some most important mouse events and their event handler. The Click Event (onclick) The click event occurs when a user clicks on an element on a web page. Often, these are form elements and links.

JavaScript Operators

Arithmetic operators JavaScript uses arithmetic operators ( + – * / ) to compute values JavaScript Expressions The values can be of various types, such as numbers and strings. For example, “John” + ” ” + “Doe”, evaluates to “John Doe”: JavaScript Keywords JavaScript keywords are used to identify actions to be performed. The var

JavaScript Code Blocks

JavaScript statements can be grouped together in code blocks, inside curly brackets {…}. The purpose of code blocks is to define statements to be executed together. One place you will find statements grouped together in blocks is in JavaScript functions:

JavaScript Statements

JavaScript Programs A computer program is a list of “instructions” to be “executed” by a computer. In a programming language, these programming instructions are called statements. A JavaScript program is a list of programming statements. JavaScript Statements JavaScript statements are composed of: Values, Operators, Expressions,¬†Keywords, and Comments. This statement tells the browser to write “Hello