Question: Define a function named Classify that takes a string as input and then determines whether the string is a single word (containing no spaces) or
Define a function named Classify that takes a string as input and then determines whether the string is a single word (containing no spaces) or a phrase (containing one or more spaces). The function should return a string value, either 'word' or 'phrase', depending on whether the input string contains any spaces. Once you have developed this function, insert its definition into your string.js library file. Then, modify your strdemo.html page so that it also displays whether the entered text is a word or phrase?
Step by Step Solution
3.50 Rating (163 Votes )
There are 3 Steps involved in it
function Classifystr Assumes s... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
1409-C-S-O-S(1136).docx
120 KBs Word File
