You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//? This program focuses on taking two numbers as input and then displaying their sum. It prompts the user to enter two numbers, add them together,then print the result.
letnum1=parseFloat(prompt("Enter the first number:"));
letnum2=parseFloat(prompt("Enter the second number:"));
if(!isNaN(num1)&&!isNaN(num2)){
letsum=num1+num2;
console.log(`The sum of ${num1} and ${num2} is ${sum}`);