Created
September 3, 2023 11:07
-
-
Save ChousinRahit/16dad2274705336ad2061cec75dda2fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Convert camelCase to snake_case | |
// Create a function that takes a string of words (or just one word) and converts each word from camelCase to snake_case. | |
// Examples | |
// camelToSnake("magicCarrots") ➞ "magic_carrots" | |
// camelToSnake("greatApples for aSmellyRhino") ➞ "great_apples for a_smelly_rhino" | |
// camelToSnake("thatsGreat") ➞ "thats_great" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment