JavaScript program to swap the values of two variables using a temporary variable
let x = 5;
let y = 10;
let temp = x;
x = y;
y = temp;
console.log("The value of x after swapping is: " + x);
console.log("The value of y after swapping is: " + y);
JavaScript program to swap the values of two variables using a temporary variable
let x = 5;
let y = 10;
let temp = x;
x = y;
y = temp;
console.log("The value of x after swapping is: " + x);
console.log("The value of y after swapping is: " + y);