How to write an IF else statement without 'else' in Javascript [closed]