Task - JavaScript User Interaction #9
Replies: 8 comments 1 reply
-
|
Task 1 } |
Beta Was this translation helpful? Give feedback.
-
|
Task 2 function confirmAdQuestion() { } |
Beta Was this translation helpful? Give feedback.
-
|
<title>Prompt</title>
<script>
// store input numbers
const num1 = parseInt(prompt('Enter the first number '));
console.log(typeof num1);
const num2 = parseInt(prompt('Enter the second number '));
console.log(typeof num2);
if((!Number.isNaN(num1)) && (!Number.isNaN(num2))) { |
Beta Was this translation helpful? Give feedback.
-
|
Task1: num1 = prompt("Enter Number1"); console.log("Number 1 Before datatype conversion is : "+typeof num1); if(typeof num1==="number" && typeof num2==="number"){ } Task2: function choice(){ } |
Beta Was this translation helpful? Give feedback.
-
|
let n= Prompt(enter number) |
Beta Was this translation helpful? Give feedback.
-
|
task 1 task 2 var myarray = [name,email,phone]; |
Beta Was this translation helpful? Give feedback.
-
| <title>Task 2</title> <script> function Query(){ let askUser = confirm ("Do you want to opt for advertisement ?"); console.log(askUser); if(askUser == true){ let name = prompt("Enter you full name"); let email = prompt("Enter you email"); let phone = prompt("Enter you phone"); let userInput = [ name, email, phone]; console.table(userInput); } } </script> |
Beta Was this translation helpful? Give feedback.
-
|
Task 1 num1 = prompt("Enter Number1"); console.log("Number 1 Before datatype conversion is : "+typeof num1); if(typeof num1==="number" && typeof num2==="number"){ } |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Beta Was this translation helpful? Give feedback.
All reactions