Strange behaviour of JavaScript in Chrome Developer Tool
问题 Recently, working with JavaScript in Developer Tool, I found strange feature. Chrome accepts any code between opening bracket with operator (plus, minus sign) and operator with closing brackets and executes it, like this: I didn't find this behaviour in another browsers, just in Chrome. Maybe it's a feature, but why and how it works, can it be problem with JavaScript engine? 回答1: This is the way chrome evaluates your input: with (typeof __commandLineAPI !== 'undefined' ? __commandLineAPI : {