19 mai 2020 · var str = “NIELIT Gorakhpur”; will assign string “NIELIT Gorakhpur” to variable str 2 Arithmetic Operators JavaScript supports the
JavaScript Operators JavaScript-Part Two Content o JavaScript Arithmetic ▫ Example o JavaScript Assignment Operators o The + Operator Used on Strings
Like most languages, JavaScript specifies computation in the form of an arithmetic expression, which consists of terms joined together by operators
Statements – Functions - Objects – Array – Strings – Math – Boolean – Global The following code shows how to use arithmetic operators in JavaScript
Note − Addition operator + works for Numeric as well as Strings e g "a" + 10 will give "a10" Example The following code shows how to use arithmetic
JavaScript Arithmetic operators JavaScript Assignment operators JavaScript string Operators Tokens Control Structures
JavaScript supports three basic data types – number, string, boolean These are used to perform arithmetic/mathematical operations like
values in JavaScript: numbers, strings, booleans, objects and undefined values ” * http://eloquentjavascript net/01_values html
To understand the precedence of arithmetic operators Strings in JavaScript can also be enclosed in single quotation marks (')
Should not use words that are commands in JavaScript Operator • Arithmetic • Assign • Bitwise • Comparative • Logic • String