Operator priority is incorrect, try the following:
query = ['browser' + (ieVersion || 'UNKNOWN')]
without additional brackets, the + operator is stronger, and the JavaScript engine evaluates it as:
query = [('browser' + ieVersion) || 'UNKNOWN']
Note that 'browser' + ieVersion never false, so you will never see 'UNKNOWN' .
source share