Escape Quotes not Working Properly

I realize I’m going to feel very silly when I get the answer to this but here goes:

var animate = ‘alert(getElementById(“ide6”).offsetWidth);’ ---------is the code I’m inputting

“alert(getElementById("ide6").offsetWidth);” -----------is what is being outputted in the console

Any idea why the slashes are being put in?

Thanks,
Akaash

Both strings are the same. It’s just often easier to define a string that has double quotes in it (ie, html) with single quotes. Saves you from having to go in and escape all the double quotes.

The console always uses the double quotes version.

Cool, thanks David!