Sometimes I need to make sure that a variable is a String. I used to do that by using the operator new String(value).
However, when I do that, the comparison doesn't work. For example:
var dude = new String("dude");
var dude2 = new String("dude");
console.log(dude == dude2); //will print 'false'
How to make string comparison when using the "new String()"?
I'm using JS as in the Google Apps Script