In Javascript, why does this statement not equal '\b,\b'
?
['\b', '\b'].join()
//=> ","
According to MDN docs on join
:
If an element is undefined or null, it is converted to the empty string.
So why is \b
being evaluated as undefined/null?
Additionally, the\b
is dropped from any string prepended with it, e.g:
['\btest', '\btest2'].join()
//=> "test,test2"
Something crazy is going on.