I was testing some stuff on Console on Chrome and then I ran that piece of code:
alert() | window.confirm();
alert() || window.confirm();
My problem was to run both alert and confirm methods in a single line without using semicolon. It turns out that both | and || worked and I can't imagine why it worked, firstly because || means an OR operator which should run one of them not both and secondly | I don't know what it is. Can someone explain what happened and what else should work instead of ;?