Javascript syntax identification -


writing regular expression, found code:

json.stringify(e.model.proceduredate).replace(/\"/g, ''); 

why /\"/g work without being quoted? isn't string, , gather, javascript doesn't have literals... call text passed .replace()?

it regular expression literal, equivalent to:

new regexp('\\"', 'g') 

in same way [] equivalent new array(0).


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -