In this FreeCodeCamp video I'll be taking you step by step in detail how I solved the "Spinal Tap Case" challenge in 2 easy steps using javascript on FreeCodeCamp .org.
This is a great video to practice using regular expressions in your code and the methods that come with it.
The steps I took to complete this challenge are as follows(I go into more detail in the video):
STEP 1
Replace all whitespace and underscores with dashes and turn string to lower case
STEP 2
Find when lower case character and upper case character are adjoining and separate them with a dash.
Useful links:
Regex101: https://goo.gl/tv3ZzZ
capturing groups: https://goo.gl/bHbSWc && https://goo.gl/xGWKRp
replace(): https://goo.gl/xUZG6D
Download
0 formats
No download links available.
FreeCodeCamp - Spinal Tap Case - SOLVED IN 2 EASY STEPS! | NatokHD