Day 13: Swap two Integer Numbers of 100DaysCodingChallenge

Hello all, 

I have started the 100 days of coding challenge to improve my programming skills..

Today is the Day13 of 100DaysCodingChallenge for 

Swap two Integer Numbers taken input by the user.

Code : 

let a = prompt("Enter a : ");
let b = prompt("Enter b : ");
console.log("Before Swaping Numbers ");
console.log("a is : ", a);
console.log("b is : ", b);
let temp = a;
a = b;
b = temp;
console.log("After Swapping Numbers ");
console.log("a is : ", a);
console.log("b is : ", b);

Output :    


Happy Coding:)


Thank you...




Comments

Popular posts from this blog

Day 55: Pattern using loops of 100DaysCodingChallenge

Day 7: Square or Power Integer Numbers of 100DaysCodingChallenge

Day 45: Pattern using loops of 100DaysCodingChallenge