Select Git revision
prep_assignment.py
-
Christopher Bohn authoredChristopher Bohn authored
conditionals.js 574 B
export function classify(number) {
let description = 'not a';
// INSTRUCTIONS: Use a chained conditional to set the variable `description`
// to 'negative' when number is negative, 'zero' when number is zero, and
// 'positive' when number is positive. If number is none of those (for
// example, if number is NaN), leave the description as it is.
//
// Resources:
// <https://javascript.info/ifelse#several-conditions-else-if>
// <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else>
return `${description} number`;
}