Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Write a function that converts a snake_case string to camelCase.

Hard

Problem Statement

Write a function that converts a snake_case string to camelCase.

Sample Input

"hello_world"

Sample Output

helloWorld

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
// Convert snake_case to camelCase function snakeToCamel(str) { // Replace underscores and capitalize letters after each underscore } console.log(snakeToCamel("hello_world"));
Log in or sign up to run or submit your code.Log inSign up
Input
"hello_world"
Expected Output
helloWorld