Check Number State
Lesson 12 of 14 in Coddy's Function Declarations in JavaScript course.
Challenge
MediumYour task is to write a JavaScript program that checks if a number is positive, negative, or zero using a function declaration.
Define a function named checkNumber that takes one argument, number and use console.log to display a message indicating whether the number is positive, negative, or zero.
Try it yourself
// Write code here
All lessons in Function Declarations in JavaScript
1Course Introduction
What you will learn?3Ways of Function Declaration
Basic FunctionNested FunctionReturning a FunctionFunction ExpressionsArrow FunctionFunction Constructor