Regarding the ternary (? :) operator in JavaScript, I would like to know how it is evaluated by a typical browser\'s JavaScript interpreter:
? :
Alternative A:<
Run this and find out:
function bool() { alert('bool'); return false; } function a() { alert('a'); return 'A'; } function b() { alert('b'); return 'B'; } alert(bool() ? a() : b())