add if else in js