Using the ampersand’s unicode code point value (0026) is the best way around this issue.
So writing ampersand would be done by using:
document.write('\u0026'); Instead of
And using the && logical operator, you can wrap your statement with the eval function. Turning this:
console.log(true && true);, into this:
eval('console.log(true \u0026\u0026 true)');
If you have alternative methods of dealing with this issue, please leave a comment or a link below.