Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript swap variables

var a = 5;
var b = 3;
[a, b] = [b, a];
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #swap #variables
ADD COMMENT
Topic
Name
2+7 =