JavaScript Program to swap two numbers without Third variable

 // Program to swap two numbers without Third variable


// a=5;b=10;
// b=5;a=10;

let a = 5;
let b = 10;

[a,b] = [b,a];
console.log(`the value a is change ${a} and value b is changed ${b}.`)

Comments

Popular posts from this blog

React Native FlatList