Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

JavaScript Assignment Operators

Operator	Name	Example
=	Assignment operator	a = 7; // 7
+=	Addition assignment	a += 5; // a = a + 5
-=	Subtraction Assignment	a -= 2; // a = a - 2
*=	Multiplication Assignment	a *= 3; // a = a * 3
/=	Division Assignment	a /= 2; // a = a / 2
%=	Remainder Assignment	a %= 2; // a = a % 2
**=	Exponentiation Assignment	a **= 2; // a = a**2
Comment

js assignment operators

x = 13 //Assigns value 13 to x
x += 13 // x = x + 13
x -= 13 // x = x - 13
x *= 13 // x = x * 13
x /= 13 // x = x / 13
x %= 13 // x = x % 13
x **= 13 // x = x ** 13
Comment

PREVIOUS NEXT
Code Example
Javascript :: socket io close client connection 
Javascript :: javascript constructor function vs factory function 
Javascript :: how to reset node command prompt 
Javascript :: window.location.search get parameters react 
Javascript :: JavaScript Window - The Browser Object Model 
Javascript :: js id generator 
Javascript :: how to get seconds in timstamps js 
Javascript :: remove all symbols javascript 
Javascript :: Rename files in a directory with node.js 
Javascript :: js camalcase 
Javascript :: javascript allow only numeric characters 
Javascript :: add javascript keyup on input 
Javascript :: lodash remove element from array 
Javascript :: javascript string includes substring 
Javascript :: webpack bundle analyzer 
Javascript :: js export multiple functions 
Javascript :: js array loop backwards 
Javascript :: js conditional object key 
Javascript :: jquery select2 how to make dont close after select 
Javascript :: how to check if a string contains a certain letter in js 
Javascript :: how to print object in JavaScript, Object print in JavaScript 
Javascript :: Javascript Regex for non-negative numbers 
Javascript :: javascript getelementbyid 
Javascript :: react useref 
Javascript :: javascript get sum array values 
Javascript :: nesting react js 
Javascript :: javascript global variable across files 
Javascript :: how to add toaster in angular 9 
Javascript :: change innertext javascript 
Javascript :: assign class to element javascript 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =