From d5866806b91eb2b75336951e6d51894b81da7756 Mon Sep 17 00:00:00 2001 From: ttran67 <ttran67@huskers.unl.edu> Date: Mon, 26 Aug 2024 22:29:35 -0500 Subject: [PATCH] Fixed b --- javascript-practice/src/bConditionals/conditionals.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/javascript-practice/src/bConditionals/conditionals.js b/javascript-practice/src/bConditionals/conditionals.js index 0788779..63a201c 100644 --- a/javascript-practice/src/bConditionals/conditionals.js +++ b/javascript-practice/src/bConditionals/conditionals.js @@ -4,7 +4,13 @@ export function classify(number) { // 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. - // + if (number < 0){ + description = 'negative'; + } else if (number === 0){ + description = 'zero'; + } else if (number > 0) { + description = 'positive'; + } // Resources: // <https://javascript.info/ifelse#several-conditions-else-if> // <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else> -- GitLab