How to bypass backward slash


function escape(s) {
s = JSON.stringify(s).replace(/</script/gi, ”);

return ‘console.log(‘ + s + ‘);’;
}

how to solve when iam give a input hello">< then " double quotes added with backward slash how iam solve this help me
someone