Question
1. Write a function with no parameters, which uses a prompt box to receive a number from the user and if that number is greater
1. Write a function with no parameters, which uses a prompt box to receive a number from the user and if that number is greater than or equal to 100, it should alert 'large number' and otherwise it should alert 'small number'.
2. Write the code for a function with no parameter, which reads the text from a textbox with the id of "txt1" and alerts it.
3. Write the code for a function with no parameters, which creates a random number between 0 and 1 using Math.random() and if the number is greater than 0.5, it should alert 'heads', and if not, it should alert 'tails'.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started