If Statement Not Working Javascript Stack Overflow

If Statement Not Working Javascript Stack Overflow