Performing Operations on Strings

JavaScript provides several properties and methods to perform operations on string values. Technically, only objects can have properties and methods. But in JavaScript primitive data types can act like objects when you refer to them with the property access notation (i.e. dot notation). JavaScript making it possible by creating a temporary wrapper object for primitive

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: