Is it even?
For integer n, return a boolean: true if n is even, otherwise false. Zero and negative even integers also return true.
Solve challenge → No login requiredJAVASCRIPT IN PRACTICE
Write a function - build a solution from scratch. Trains clean coding and algorithms.
First challenge without login · Free
Pick a challenge and explore the rules through a concrete example.
For integer n, return a boolean: true if n is even, otherwise false. Zero and negative even integers also return true.
Solve challenge → No login requiredAn admin panel reads a product limit from an API. Return fallback only when value is null; the JS function should also handle undefined, which JSON fixtures cannot…
Solve challenge → No login requiredReject repeated ids for ttl milliseconds after their last acceptance. events are ordered by non-decreasing integer time and have string ids. Accept the first occurrence…
Solve challenge → No login requiredAvailable challenges: 122.
See all challenges →The full catalogue requires a free account.
JavaScript function exercises practise turning requirements into a specific result: a number, string, array or object. This is useful for transforming API data and building form logic; familiarity with variables, conditions and functions is enough to get started.
Check the function name, arguments and expected return type. Return the value with return; logging it is not a substitute for the function result. Start with a clear solution, run the tests and inspect edge cases. Check whether modifying the input is allowed.
Solve this challenge without creating an account.