How To Write Javascript If Statement