Jr.DevJobs Challenge: Pig Latin
In this challenge you will create a webpage that will translate a word or sentence into Pig Latin. The rules for the translations are listed in the user story.
You are free to do this in any language or framework, however the sample is written in JavaScript.
To begin, Fork this repository to your GitHub account by clicking the Fork icon in the upper-right section of this page.
If you're new to Forking, we suggest reading the GitHub documentation before moving forward.
As a user, I want to translate a word or sentence into Pig Latin.
There are many variations of Pig Latin. For our purposes, we'll be using the following rules:
- Words that start with a vowel, add 'ay' to the end of the word
- Words that start with one or more consonants, move the leading consonants to the end of the word and add 'ay'
- If 'qu' is included in the leading consonants, move the 'u' along with 'q' to the end of the word and add 'ay' (don't skip words like 'squeak')
- For words that start with 'y', treat the 'y' as a consonant
- For now, don't worry about capitalization or punctuation
- Duck: uckday
- Squeak: eaksquay
- Apples and bananas: applesay anday ananasbay
- Run quickly: unray icklyquay
- I am a junior developer: iay amay aay uniorjay eveloperday
We've included specs to test your code using Mochai and Chai.
- To run the tests, open
spec/spec-runner.htmlin your browser
