Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript increment pre increment

let a = 2
let b = a++

console.log(a, ' - ', b)	// [Log]: 3 - 2

a = 2
b = ++a

console.log(a, ' - ', b)	// [Log]: 3 - 3
 
PREVIOUS NEXT
Tagged: #javascript #increment #pre #increment
ADD COMMENT
Topic
Name
4+2 =