Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
Check if Number is Even
Easy
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Write a function that takes a number and returns true if it's even, false otherwise.
Sample Input:
4
Sample Output:
true
Hints
Hint 1
Use the modulo operator (%) to check for even numbers
Hint 2
A number is even if num % 2 === 0
Hint 3
Return a boolean value
Code Editor
Reset
Run
Save
Loading...