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 22:50
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 23.06.2019 06:00
Which statistical function in a spreadsheet you to see how far each number varies, on average, from the average value of the list?
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
Which is a possible benefit of having a good credit history? having a checking account low interest rate on a car loan high interest rate on a credit card offer bankruptcy
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
Me ajude por favor , coloquei uma senha e nΓ£o consigo tira-la no chorme
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
question
Mathematics, 16.09.2020 14:01
question
Spanish, 16.09.2020 14:01
question
Mathematics, 16.09.2020 14:01
question
Mathematics, 16.09.2020 14:01
question
Mathematics, 16.09.2020 14:01
question
Mathematics, 16.09.2020 14:01
question
Mathematics, 16.09.2020 14:01
question
English, 16.09.2020 14:01
question
Mathematics, 16.09.2020 14:01
question
Mathematics, 16.09.2020 14:01
question
Mathematics, 16.09.2020 14:01
question
English, 16.09.2020 14:01
question
Mathematics, 16.09.2020 14:01
question
Mathematics, 16.09.2020 14:01
question
Mathematics, 16.09.2020 14:01
question
Mathematics, 16.09.2020 14:01
question
Mathematics, 16.09.2020 14:01
question
Mathematics, 16.09.2020 14:01
question
Mathematics, 16.09.2020 14:01
Questions on the website: 13722360