Menu
Coddy logo textTech

Check Number State

Lesson 12 of 14 in Coddy's Function Declarations in JavaScript course.

challenge icon

Challenge

Medium

Your 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