I was baffled when a colleague showed me this line of JavaScript alerting 42.(当一位同事向我展示这一行警告42时,我感到很困惑。)
It quickly turns out that what looks like a minus sign is actually an arcane Unicode character with clearly different semantics.(事实证明,看起来像减号的实际上是一个神秘的Unicode字符,具有明显不同的语义。)
This left me wondering why that character doesn't produce a syntax error when the expression is parsed.(这让我想知道为什么该字符在解析表达式时不会产生语法错误。)
I'd also like to know if there are more characters behaving like this.(我还想知道是否有更多的人物表现得像这样。)
ask by GOTO 0 translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…