Nickname Generator
Difficulty Rating: 1.75 / 5
See the Pen Nickname Generator by Fullstack Academy (@FullstackAcademy) on CodePen.
Click on a hint if you get stuck or review the solution.
Hint-1: Check Characters
If you are trying to check for a specific character or character in a string, two useful methods are:
Regular Expressions are also great to use but they can be challenging to learn and master. The string methods above are a great and common approach. As your coding skills advance, Regular Expressions are a great topic to study.
Hint-2: SLICE
Review how to use the slice method 'fullstack'.slice(0,4) // --> 'full'
.
<code class='language-js'> var javaScript = 'javaScript'; console.log(javaScript.slice(0,4)) // java console.log(javaScript.slice()) //...fill in the arguments so the string "Script" logs. </code>