Question: To speak the Pig Latin code language, move the first letter of each word to the end of the word and add ay to the
To speak the "Pig Latin" code language, move the first letter of each word to the end of the word and add "ay" to the end. For example, Pig Latin form of mathematics would be athematicsmay. Write a function using JavaScript that returns the Pig Latin form of the first word in a string passed to it. You may assume that the string contains only letters, but you cannot assume the string contains only one word. For example:
var t = pword("This is the last code question") would define t to be histay.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
