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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
Which option marks all modification made within a document? review comment track changes balloons
Answers: 1
question
Computers and Technology, 24.06.2019 00:40
What social factors affect your health
Answers: 3
question
Computers and Technology, 24.06.2019 01:00
Mastercard managers are motivated to increase (1) the number of individuals who have and use a mastercard credit card, (2) the number of banks and other clents who issue mastercards to customers and/or employees, and (3) the number of locations that accept mastercard payments. discuss how mastercard could use its data warehouse to it expand each of these customer bases.
Answers: 3
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
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
question
Biology, 13.07.2021 04:20
question
Mathematics, 13.07.2021 04:20
question
Mathematics, 13.07.2021 04:20
question
Mathematics, 13.07.2021 04:20
question
Mathematics, 13.07.2021 04:20
question
Chemistry, 13.07.2021 04:20
question
Arts, 13.07.2021 04:20
Questions on the website: 13722363