1. What is a Number function? Give one example for it.
2.Write one difference between confirm box, alert box and prompt box
3.Write a Javascript program to enter a famous location. Check if the entered location is QASR AL WATAN or MUSEUM OF FUTURE.
If the entered location is same as QASR AL WATAN or MUSEUM OF FUTURE display the message “It is located in UAE” else display the message “It is not located in UAE”
Answers
Answer:
The Number() function converts the object argument to a number that represents the object's value. If the value cannot be converted to a legal number, NaN is returned. Note: If the parameter is a Date object, the Number() function returns the number of milliseconds since midnight January 1, 1970 UTC.
__________________________
Here are some examples:
Set of even numbers: {..., -4, -2, 0, 2, 4, ...}
Set of clothes: {"hat","shirt",...}
Set of prime numbers: {2, 3, 5, 7, 11, 13, 17, ...}
Positive multiples of 3 that are less than 10: {3, 6, 9}
__________________________
Alert box is mainly used to communicate a message to the user and displays one ok button and confirm box is opposite to alert box. Confirm box has two buttons such as true or false and ok or cancel. User can choose one button depending on the user's choice.
__________________________
Mark as BRAINLIST ANSWER
Explanation:
follow me