diff --git a/guide/english/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/pig-latin/index.md b/guide/english/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/pig-latin/index.md
index 1b8ff01a65..135d90de37 100644
--- a/guide/english/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/pig-latin/index.md
+++ b/guide/english/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/pig-latin/index.md
@@ -36,6 +36,31 @@ You will need to use everything you know about string manipulation to get the la
**Solution ahead!**
+##  Basic Code Solution:
+
+ function translatePigLatin(str) {
+ let consonantRegex = /^[^aeiou]+/;
+ let myConsonants = str.match(consonantRegex);
+ return (myConsonants !== null) ? str.replace(consonantRegex, "").concat(myConsonants).concat("ay") : str.concat("way");
+ }
+
+ translatePigLatin("consonant");
+
+
+### Code Explanation:
+* start at beginning and get longest match of everything not a vowel (consonants)
+* if regex pattern found, it saves the match; else, it returns null
+
+* if regex pattern found (starts with consonants), it deletes match, adds the match to the end, and adds "ay" to the end
+* if regex pattern not found (starts with vowels), it just adds "way" to the ending
+
+#### Relevant Links
+
+* Regex Match
+* Ternary Operator
+* concat()
+
+
##  Basic Code Solution:
function translatePigLatin(str) {