top of page

Program to Convert String from Snake_Case to CamelCase in JavaScript

Updated: Dec 16, 2021

Snake_Case: A string in snake_case uses the underscore character to separate each word. Each word in a snake_case string usually begins with a lowercase letter, although variants exist.

CamelCase: A camelCase string begins with a lowercase letter, each following word beginning with an uppercase letter. There are no intervening spaces or punctuation in a camelCase string.


let snakeCaseString = "The_Tech_Platform"  
const snakeToCamelCase = sentence => sentence  
    .map((word, index) => {  
        if (word === 0) {  
            return part.toLowerCase();  
        return firstUppercase(word);  
const firstUppercase = word => word &&  
    word.charAt(0).toUpperCase() + word.slice(1);  


Read More:

Find Factorial of Number

Program to Swap Two variables

Check whether given string is Palindrome or not

Program to Reverse a list

Print Fibonacci Series

Multiply List in Python

Sum of List in Python

The Tech Platform

bottom of page