Question: Using Javascript , complete the following tasks below: You also need to use innerHTML . Show how prototype enables you to extend an existing String

Using Javascript, complete the following tasks below: You also need to use innerHTML.

Using Javascript, complete the following tasks below: You also need to use

Show how prototype enables you to extend an existing String class by writing a JavaScript method that will perform the following tasks: Use a method named "divideby235" The method takes in one argument The argument is an English word The method needs to check whether the English word is in the string If the English word is in the string, the method will count the number of characters in the English word and return: o This word can be divided by 2" if the number of characters of the word is divisible by 2 "This word can be divided by 3" if the number of characters of the word is divisible by 3 This word can be divided by 5" if the number of characters of the word is divisible by 5 o This word cannot be divided by 2, 3 or 5 if the number of characters of the word is NOT divisible by 2, 3 or 5 If the English word is NOT in the string, the method will return "This word is NOT in the string" In addition, show how you make use of your new method by using innerHTML

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!