Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago