79. convert snake_case to camelCase

JavaScript

medium  - accepted / - tried

Do you prefer snake_case or camelCase ?

Anyway, please create a function to convert snake_case to camcelCase.

snakeToCamel('snake_case') // 'snakeCase'snakeToCamel('is_flag_on') // 'isFlagOn'snakeToCamel('is_IOS_or_Android') // 'isIOSOrAndroid'snakeToCamel('_first_underscore') // '_firstUnderscore'snakeToCamel('last_underscore_') // 'lastUnderscore_'snakeToCamel('_double__underscore_') // '_double__underscore_'

contiguous underscore __, leading underscore _a, and trailing underscors a_ should be kept untouched.

Always try to find a better approach.