completed JS if/else tasks