“if” and “?”: how they're different in Javscript