In this video I'll be taking you step by step in detail how I solved the "Weird String Case" challenge in 6 easy steps using javascript on codewars.
This is a great video for beginner and intermediate levels. You'll be working with loops, array & string methods and a multi dimensional array.
The steps I took to complete this challenge are as follows(I go into more detail in the video):
STEP 1
Change string to lower case.
STEP 2
Split the string up on spaces.
STEP 3
Create a loop and split every word into an array of letters.
STEP 4
Create a second loop to go over all the items in the inner arrays.
STEP 5
Turn every even indexed character into upper case.
STEP 6
Join the letters back into words and words back into a sentence.
Useful links:
toLowerCase(): https://goo.gl/kHSwtH
toUpperCase(): https://goo.gl/mJxT4e
split(): https://goo.gl/3J3rLn
join(): https://goo.gl/aYzGbj
multidimensional array: https://goo.gl/UPrFGe
Download
0 formats
No download links available.
codewars javascript - Weird String Case - SOLVED IN 6 EASY STEPS! | NatokHD