Here is the code snippet I've been working on:
function toCamelCase(str){
var rest = str.replace((/-/)|(/_/)g, "") ;
document.write(rest);
}
toCamelCase("the-stealth_warrior");
When running this code, I receive an error message: Uncaught SyntaxError: missing )
. My intention is for the regex to remove both underscores and hyphens.