I am running the following script on Edge's, Firefox's, and Chrome's console:
var test=''; console.log(test);
On both Firefox and Chrome, I get an empty string. On Edge, however, I get the following:
{
"notifyType": "consoleItemLog",
"message": {
"message": "",
"styles": "",
"hasFormatString": true,
"fileUrl": "eval code (1)",
"lineNumber": 1,
"columnNumber": 14
}
}
I am able to confirm this on two computers with Edge. Can someone tell me why this is happening and what does it mean?
Truthy or Falsy When javascript is expecting a boolean and it's given something else, it decides whether the something else is “truthy” or “falsy”. An empty string ( '' ), the number 0 , null , NaN , a boolean false , and undefined variables are all “falsy”. Everything else is “truthy”.
Yes. All false , 0 , empty strings '' and "" , NaN , undefined , and null are always evaluated as false ; everything else is true .
An empty string is a string instance of zero length, whereas a null string has no value at all. An empty string is represented as "" . It is a character sequence of zero characters. A null string is represented by null .
An empty string is a String object with an assigned value, but its length is equal to zero. A null string has no value at all.
This has been fixed in response to your bug report. It says "Fixed in build # 17.17681", which means the fix will ship with Windows 10 RS5 (17681 is an internal build; the closest Insider build, 17682, may or may not contain the fix, and it's nearly a month old as of this writing anyway).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With