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 :: js how to find element using id 
Javascript :: style scoped vue 
Javascript :: await in react in function component 
Javascript :: biding multiple class vuejs 
Javascript :: nodejs bodyparser form data 
Javascript :: tinymce update textarea value using jquery 
Javascript :: js array to csv download 
Javascript :: iife javascript 
Javascript :: upload preview image js 
Javascript :: jquery chek radio 
Javascript :: javascript set input value 
Javascript :: change key name in array of objects javascript 
Javascript :: js html tag valu 
Javascript :: javascript button onclick reload page 
Javascript :: cookie clicker hack extension 
Javascript :: window load 
Javascript :: javascript code to open excel file and read contents 
Javascript :: find by array of ids mongoose 
Javascript :: run function then empty it javascript 
Javascript :: website design html css javascript 
Javascript :: angular call child method from parent 
Javascript :: js get file location 
Javascript :: Summernote keyup event jquery 
Javascript :: create module with routing in angular 13 
Javascript :: javascript html append 
Javascript :: jquery post 
Javascript :: check Browser version js 
Javascript :: babylon js camera position 
Javascript :: react add class to each children 
Javascript :: electron new window 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =