+ 1

How can i swap two numbers using jQuery?!?

10th Aug 2018, 5:14 AM
Code_Magician❤
Code_Magician❤ - avatar
3 Respuestas
+ 13
var a = 1; var b = 2; var temp = a; a = b; b = temp; Or using ES6: [a, b] = [b, a];
10th Aug 2018, 6:01 AM
Igor Makarsky
Igor Makarsky - avatar
+ 6
10th Aug 2018, 6:20 AM
Yash✳️
Yash✳️ - avatar
0
Igor Makarsky I am getting input from the user how can I swap them via jQuery?!?
10th Aug 2018, 6:08 AM
Code_Magician❤
Code_Magician❤ - avatar