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

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!