Question: JavaScript 1. Write a function named f1 In the body of the function write code for the following. Declare a variable named v1 Assign a
JavaScript
1. Write a function named f1
-
In the body of the function write code for the following.
-
Declare a variable named v1
-
Assign a value of the string literal Hello from function f1 to the variable v1.
-
Call the alert function to display the value of v1.
-
-
Outside of the body of the function named f1, write the code to call function f1.
------------------------------------------------------------------------------------------------------------------------------------
-
Write a function name f2. The function will accept one parameter named p1.
-
In the body of the, write an IF statement which evaluates the value of p1.
-
If the value of p1 is greater than 10, display a popup alert message which is the value is greater than 10.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
