subject

Onclick of the picture of the penguin, call the function namechange( ) and pass the id of 'p' to it Onclick of the picture of the gorilla, call the function namechange( ) and pass the id of 'g' to it
Repeat this with the other 4 animals passing ids of e, t, l and z respectively
In the JavaScript section, declare a global variable called animal and create a function called namechange( ) and place the variable animal in the parentheses as the parameter
Get the innerHTML of the element with the Id of the variable animal and store it to the variable name
Create a do/while loop with the control expression of ( num1 == num2 ) and inside of it, use the following code twice: Math. floor( Math. random( ) * name. length ); and save the random values to the variables num1 and num2
Create another do/while loop and prompt the user for a consonant and store it to the variable con
Still in the do section, if con != null then you are going to convert con toLowerCase( ) and store it back to con
The control expression for the while should not allow a number, the keyword null, a length that does not equal 1, an a, e, i, o or u or an empty string.
Create a new do while loop and prompt the user for a vowel and store it to the variable vow
Still in the do section, if vow != null then you are going to convert vow toLowerCase( ) and store it back to vow
This time the control expression in the while should not allow the keyword null, a length that does not equal 1, an empty string or while vow does not equal a, e, i, o AND u. Be careful with this step, make sure it works!
Create an if structure that changes con toUpperCase( ), and stores it back to con, if num1 is equal to 0
Create an if structure that changes vow toUpperCase( ), and stores it back to vow, if num2 is equal to 0
Replace the character at position num1 with the value of con using the following code: name = name. replace(name. charAt(num1), con);
Replace the character at position num2 with the value of vow using the following code: name = name. replace(name. charAt(num2), vow);
Finally, change the innerHTML of the element with the id of the variable animal to be equal to name

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 00:00, dubouuu
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
image
Computers and Technology, 23.06.2019 16:30, mirmir62
Which of the following is not an enhancement to the standard wiki to make it more attractive for corporations? encryptionwork spacespermission toolspredictive text
Answers: 2
image
Computers and Technology, 24.06.2019 00:00, amy7233
Afashion designer wants to increase awareness about her brand. which network can she use and why she can use the blank to blank her products online. answers for the first blank: internet, extranet, or intranet answers for the second blank: market, design, and export
Answers: 1
image
Computers and Technology, 24.06.2019 13:00, juuuuuu42
George heard about the benefits of a data warehouse. he wants to try implementing one for his organization. however, he is afraid that transferring data to the data warehouse will affect transaction time. which element ensures that transactions are not affected when moving data to a warehouse? when data is transferred to a data warehouse, the a area frees the source system to continue transaction processing.
Answers: 2
You know the right answer?
Onclick of the picture of the penguin, call the function namechange( ) and pass the id of 'p' to it...

Questions in other subjects:

Konu
Mathematics, 05.10.2020 15:01