Question: - In Javascript Write a function named givenName with one parameter named fullName. The parameter fullName will always contain a persons family and given names
- In Javascript Write a function named givenName with one parameter named fullName. The parameter fullName will always contain a persons family and given names in that order separated by a comma and a single space, for example "Reagan, Ronald" (without the quotation marks). The function should extract and return the persons given name, for example "Ronald" (without the quotation marks).
- In Javascript Write a function named prefix that returns the common prefix of two strings. For example, the common prefix of "disable" and "distasteful" is "dis". This function takes two parameters and returns the common prefix.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
