Skip to content
Snippets Groups Projects
Select Git revision
  • eca8ffc8d495f8dcfc6f137764609dd59f99bb4b
  • master default protected
2 results

prep_assignment.py

Blame
  • 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`;
    }