AI LabExerciseFlashcardChallenge
⚡JavaScript Tutorial
Activities
ExerciseCode EditorReferenceSnippetsCheatsheetsCommunityFlashcardBlogCode ChallengeAI LabsCertificate
Lessons
JavaScript Home
01JavaScript Introduction
02let & const
03JavaScript Functions
04JavaScript Arrays
05Objects

Code Challenges

Code challenges for JavaScript. Each challenge links to its lesson page where you can solve it with live code execution.

3 challenges · 2 lessons
02let & const
1 challenges
# Greeting Function Create a function `greet(name)` that returns `"Hello, <name>!"`. Then `console.log(greet("Aarav"))`. ## Expected Output ``` Hello, Aarav! ```easy
03JavaScript Functions
2 challenges
# Sum of Array Given `const nums = [1, 2, 3, 4, 5]`, print the sum of all numbers using `.reduce()`. ## Expected Output ``` 15 ```medium# Filter Evens Given `const nums = [1, 2, 3, 4, 5, 6, 7, 8]`, use `.filter()` to print only the even numbers as an array. ## Expected Output ``` [2,4,6,8] ```medium

w3primecode is a free multilingual platform to learn programming — tutorials, runnable code, AI tutor, spaced-repetition flashcards, and verifiable certificates, all in 14 languages.

Product

Company

For Agencies

Newsletter

Weekly coding tips in your language

Available Languages

Englishहिन्दीবাংলাमराठीతెలుగుதமிழ்ગુજરાતીಕನ್ನಡമലയാളംଓଡ଼ିଆਪੰਜਾਬੀनेपालीརྫོང་ཁසිංහල

© 2026 w3primecode. All rights reserved.