Menu
I have just been talking to a fellow developer and he came accross a JavaScript if statement that goes something like this:
if(“j” == ‘j’) {
document.write(someText);
} else {
writeText(someText);
}
function writeText(text) {
document.write(text);
}
My question is, what would fail at testing the j in double quotes to single quotes? Something that doesn’t like using document.write unless it is from inside a function?