Skip to content
Snippets Groups Projects
Commit d5866806 authored by ttran67's avatar ttran67
Browse files

Fixed b

parent 9c24cb8b
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,13 @@ export function classify(number) { ...@@ -4,7 +4,13 @@ export function classify(number) {
// to 'negative' when number is negative, 'zero' when number is zero, and // to 'negative' when number is negative, 'zero' when number is zero, and
// 'positive' when number is positive. If number is none of those (for // 'positive' when number is positive. If number is none of those (for
// example, if number is NaN), leave the description as it is. // 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: // Resources:
// <https://javascript.info/ifelse#several-conditions-else-if> // <https://javascript.info/ifelse#several-conditions-else-if>
// <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else> // <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/if...else>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment