Free Javascript challenges

Learn Javascript online by solving coding exercises.

Javascript for all levels

Solve Javascript tasks from beginner to advanced levels.

Accross various subjects

Select your topic of interest and start practicing.

Start your learning path here

Why jschallenger, a hands-on javascript experience.

JSchallenger provides a variety of JavaScript exercises, including coding tasks, coding challenges, lessons, and quizzes.

Structured learning path

JSchallenger provides a structured learning path that gradually increases in complexity. Build your skills and knowledge at your own pace.

Build a learning streak

JSchallenger saves your learning progress. This feature helps to stay motivated and makes it easy for you to pick up where you left off.

Type and execute code yourself

Type real JavaScript and see the output of your code. JSchallenger provides syntax highlighting for easy understanding.

Join 1.000s of users around the world

Most popular challenges, most failed challenges, what users say about jschallenger.

Photography of Mohamed Ibrahim who describes JSchallenger as a very helpful free resource for Javascript exercises

Mohamed Ibrahim

Photography of Tobin Shields who sais that JSchallenger is a great tool with Javascript beginner exercises

Tobin Shields

Photography of Meet Patel who describes JSchallenger as a great place to solve Javascript problems

  • DSA with JS - Self Paced
  • JS Tutorial
  • JS Exercise
  • JS Interview Questions
  • JS Operator
  • JS Projects
  • JS Examples
  • JS Free JS Course
  • JS A to Z Guide
  • JS Formatter

JavaScript Exercises, Practice Questions and Solutions

JavaScript Exercise covers interactive quizzes, track progress, and enhance coding skills with our engaging portal. Ideal for beginners and experienced developers, Level up your JavaScript proficiency at your own pace. Start coding now!

A step-by-step JavaScript practice guide for beginner to advanced level.

How to Start Practicing JavaScript

When you start learning JavaScript journey with us, you will find a structured and engaging environment designed to help you master key concepts step by step. Here’s how you can get started:

  • Choose Your Category: Begin by selecting a category that matches your current focus or skill level. Whether it’s variables, control flow, loops, operators, functions, events, arrays, or strings, each category offers a set of challenges tailored to deepen your understanding and mastery.
  • Engage with Interactive Challenges: Get the hands-on coding exercises within each category. These exercises are crafted to provide practical experience and reinforce your theoretical knowledge.
  • Track Your Progress: Monitor your learning journey with real-time feedback. Each category displays your score, time taken, and completion status, allowing you to gauge your improvement and focus on areas that need more practice.
  • Flexible Learning: Practice at your own pace. Whether you prefer to tackle all exercises in one go or spread them out over sessions, our platform adapts to your schedule and learning style.
  • Access Anytime, Anywhere: Our online platform ensures accessibility wherever you are. Whether you’re at home, work, or on the go, you can continue learning and practicing JavaScript seamlessly.
  • Prepare for Real-World Applications: Each exercise is designed to simulate real-world coding scenarios. By mastering these challenges, you will build the confidence and skills needed to excel in practical JavaScript development.
  • Seek Guidance and Solutions: If you ever get stuck, our platform provides solutions to help you navigate through challenging exercises and deepen your understanding.

By following these steps, you will not only enhance your JavaScript skills but also enjoy a rewarding and structured learning experience that prepares you for success in JavaScript programming.

JavaScript Best Practice Guide

Explore JavaScript best practices with our comprehensive guide. Discover coding standards, optimization techniques, and industry-recommended approaches. Enhance your skills through practical examples, insightful tips, and interactive challenges.

Learn how to write efficient and maintainable JavaScript code that stands out in your projects.

Why Practice JavaScript Online?

Practice JavaScript effectively with structured fill-in-the-blank questions that:

  • Guide focused learning and improvement.
  • Provide instant feedback to reinforce concepts.
  • Integrate theory with practical application for comprehensive understanding.
  • Prepare you for real-world coding challenges.

JavaScript online practice Rules

Follow these guidelines for effective learning:

  • Manage your time effectively within set limits.
  • Prioritize clean, well-documented code.
  • Adhere to platform-specific instructions and submission procedures.
  • Refrain from using external resources unless permitted.
  • Use feedback to enhance your skills and actively participate in discussions for continuous improvement.

Benefits of Practice JavaScript

Master JavaScript through engaging exercises that offer:

  • Hands-on learning with interactive quizzes.
  • Progress tracking to monitor your improvement.
  • Effective skill enhancement at your own pace.
  • Immediate feedback for quick learning.
  • Access anytime, anywhere for convenient learning.
  • Practical application of JavaScript concepts.
  • Comprehensive coverage of JavaScript topics.

Features of JavaScript Exercises Portal

  • Immediate error correction and feedback.
  • Unlimited attempts to master concepts.
  • Time management tools with displayed elapsed times.
  • Comprehensive view of categories, completion status, and scores.
  • Helpful hints and solutions for guided learning.
  • Adaptive difficulty levels for personalized challenges.
  • Gamification elements such as scoring and achievements to keep learning engaging.

Explore our interactive JavaScript exercises designed for both beginners and experienced developers. Master key concepts, track your progress, and prepare for real-world coding challenges. Start practicing now to sharpen your JavaScript expertise and advance your programming journey with confidence.

JavaScript Exercises – FAQs

What are javascript exercises .

JavaScript exercises are coding challenges or problems based on fill in the blanks to help you to practice and improve your JavaScript programming skills. This exercise for beginners and experienced developer.

Where can I find JavaScript exercises?

You can find JavaScript exercises on GeeksforGeeks platform with compiled set of problems. Apart from Exercises, we offer a curated JavaScript tutorial and JavaScript course to learn easily.

What are some good beginner JavaScript exercises?

For beginners, exercises like working with variables, loops, arrays, functions, and simple DOM manipulations are great starting points.

Please Login to comment...

Similar reads.

  • Web Technologies
  • WebTech - Exercises
  • 105 Funny Things to Do to Make Someone Laugh
  • Best PS5 SSDs in 2024: Top Picks for Expanding Your Storage
  • Best Nintendo Switch Controllers in 2024
  • Xbox Game Pass Ultimate: Features, Benefits, and Pricing in 2024
  • #geekstreak2024 – 21 Days POTD Challenge Powered By Deutsche Bank

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

10-JavaScript-code-challenges-for-beginners

12 JavaScript Code Challenges for Beginners

CC-logo-short.png?w=1000

  • Share article on Twitter
  • Share article on Facebook
  • Share article on LinkedIn

Online courses are a great place to learn the foundations of code. But it’s when you put things into practice that you cement the concepts into your brain.

Figuring out how to solve problems and conquer coding challenges can be truly rewarding (and fun!). Stephanie, a Software Developer from Baltimore, shares why practice (including code challenges) is key to mastering a programming language :

“Codecademy is a great starting point for learning different programming languages and introducing concepts, but there’s only so much you can cover in a course. A good chunk of mastering a language is learning through experience.”

In this article, we’ll share 12 short beginner JavaScript code challenges that you can tackle. Try selecting one each day and see how you do. We’ll also share how you can continue challenging yourself and your JavaScript skills after completing our suggested list.

Top 12 JavaScript code challenges for beginners

Each of these challenges is suitable for beginners, but you may find that having a base-level knowledge of JavaScript is helpful. Or, if you have a little bit of experience, you might benefit from refreshing your knowledge with our introductory course on JavaScript .

While we don’t specify here, you can use whatever coding environment suits you best. You can use what you’re comfortable with on your local machine, or you can use the environments you’re familiar with in online JavaScript courses. Don’t forget that Google can also help if you find yourself stuck on a coding problem , but try to see if you can create a solution before heading to the search engine.

1. Print all even numbers from 0 – 10

Try to make the solution to this problem as efficiently as possible. Consider using loops that would allow you to type the fewest characters/commands. While you could simply print the even numbers, get creative and see how you could output them in a way that would work up to 10 or even up to 10,000 with little extra effort.

2. Print a table containing multiplication tables

Let’s start with the tables that many of us had to memorize in school. Can you print a table that contains all the answers to the multiplication tables from 1 through 10?

Like Challenge #1, can you create an efficient solution that you could easily expand should you need the 12 times table?

3. Create a length converter function

Creating a function is a skill that’ll be useful in many settings, and as you progress, you’ll be working on much more complicated functions than this one. But a function that converts units of measure can be pretty handy in multiple professions and industries.

Let’s start with a conversion from kilometers to miles. The function should include the input in kilometers and return the answer in miles.

4. Calculate the sum of numbers within an array

You can create your own array of numbers but consider trying this problem with a few different sets to verify your solution. Have one array with negative and positive numbers and another with integers and decimals.

You could also try using arrays of different lengths. If you’re feeling comfortable with this, try the slightly more challenging bonus challenge below.

Bonus intermediate challenge: Create a function that can return the sum of a particular column or row number in a table.

5. Create a function that reverses an array

This challenge is particularly helpful if you’re planning to become a Data Scientist . Manipulating data is a significant part of the role, and building the foundations now will help you later down the road when you’re working with large databases.

Start small here and work your way up. Begin with an array of 5 numbers, and then try your program with a larger array to verify its success.

6. Sort an array from lowest to highest

You could create a function for this solution as well, but be sure to try your program with varying lengths and types of arrays. Try one with all integers, another with negative numbers, and another with decimals.

7. Create a function that filters out negative numbers

In this challenge, you’ll have a function that takes an array as an input and returns an array. But if all goes according to plan, it’ll remove the negative numbers. This is another example of a task that’ll be useful when combing through data and looking for clever ways to eliminate “bad data.”

8. Remove the spaces found in a string

Yet another way to clean up data is to remove any errors or unnecessary spaces. This function will take in a string and then return it with all spaces removed. Think about if you were tasked with cleaning up customer data at your job. You could scale this function to clean up specific fields of data, such as zip codes.

9. Return a Boolean if a number is divisible by 10

Here, you’ll create a function that’ll give you a “true” or “false” Boolean as its output. The inputted number should only return a “true” if it’s divisible by 10. Otherwise, your program should return a “false” answer.

10. Return the number of vowels in a string

Create a function that’ll return an integer of the number of vowels found in a string. This is a great way to practice determining the features of a dataset. If you use JavaScript later in your career, you’ll be well-prepared to determine what datasets (or just strings) consist of. If you feel like an extra challenge, consider returning the number of characters.

11. Create a function that finds the maximum number in an array

In this challenge, you’ll write a function that takes an array of numbers as an input and returns the largest number in that array. Test your function with various arrays, including arrays with negative numbers, decimals, and all positive integers.

12. Check if a string is a palindrome

A palindrome is a word, phrase, number, or other sequences of characters that reads the same forward and backward (like the words “kayak,” “mom,” “radar,” and “refer”). Create a function that takes a string as input and returns a Boolean indicating whether the string is a palindrome. Test your function with different strings to ensure it works correctly.

Brush up on your JavaScript with courses and challenges

If you enjoyed putting your JavaScript skills to the test with these challenges, then consider signing up for more by downloading the Codecademy Go app . Participating in our daily or weekly challenges is an excellent way to keep your skills fresh and continue learning to solve problems.

If you wish to go a little deeper with your learning or explore more complex problems and coding challenges, consider taking an intermediate-level course. You can learn more and level up your skills to prepare for your future career with courses and Skill Paths like Create an Advanced Web App with React and Reduct or Create a Back-End App with JavaScript . So what are you waiting for? Get started today!

This blog was originally published in August 2021 and has been updated to include additional JavaScript challenges for beginners.

Related courses

Learn javascript, learn typescript, learn intermediate javascript, subscribe for news, tips, and more, related articles.

Post-Quiz-Illustration.png?w=1024

Behind the Build: Designing Post-Quiz Review

Feedback is back in town with post-quiz review.

Group-2863.png?w=1024

How to Estimate the Amount of Time You Need for a Project 

How long is a piece of string? Estimating software engineering work is part science, part finger in the air — here’s some practical advice to get started.

How-to-Use-AI-to-Get-Ahead-in-School.webp?w=1024

How to Use AI to Get Ahead in School

Get AI-ready for the school year by learning these concepts.

CC-BTS-Blog-illustration-College-Students.webp?w=1024

8 Ways Students Use Codecademy to Excel in Class (& Life)

Learn the skills you’ll actually use in the real world with Codecademy Student Pro.

What-Is-CoffeeScript-.png?w=1024

What Is CoffeeScript?

What is CoffeeScript, and is it worth learning? In this article, we explain how it changed the way we write both front-end and back-end JavaScript code.

what-is-javascript-used-for.png?w=1024

What Is JavaScript Used For?

JavaScript is a powerful programming language with a wide range of applications. Learn about its uses in web development, game development, VR & more.

CoolJobs-Zach-Mansell_Blog@2x.webp?w=1024

Cool Job: I’m a Software Engineer at LinkedIn & Orchestral Cellist

After a decade-long career as an orchestral cellist, here’s how Zach Mansell became a software engineer.

Master .css-8ujquh{background-color:#fdcb6e;color:rgba(0, 0, 0, 0.87);padding:0px 8px;} JavaScript with Open Challenge !

Improve your skills and become a better developer by solving coding exercises online. Whether you're a beginner or an advanced developer, we have exercises for everyone! Join a community of thousands of satisfied people from different countries who are already learning with us!

JavaScript Challenges

Master JavaScript with challenging coding exercises. Improve your skills with practice!

For Everyone

Learn JavaScript at any level. Our exercises cater to all skill levels. Start growing today!

Practice What Matters to You

Choose from a variety of topics. We believe in engaging, fun learning. Pick your favorite and start practicing!

What sets Open Challenge apart

Whether you're just starting out with JavaScript, or you're already an experienced developer, Open Challenge has everything you need to take your skills to the next level. Our carefully crafted exercises are designed to be both challenging and fun, so you can learn and grow as you practice.

Our platform is built with developers in mind. Our coding challenges are designed to keep you ahead of the curve, and our user-friendly interface makes it easy to navigate and find the topics you're most interested in. Plus, you'll have access to to an assistant with Artificial Intelligence to help you with any queries.

Whether you're a complete beginner or an experienced developer, Open Challenge is the perfect place to level up your JavaScript skills. So what are you waiting for? Start your journey today!

Ready to get started?

  • Vote for features

Planned features by votes

  • Publish fiddles as mini-websites
  • Save fiddles as templates
  • Download a zipped fiddle

Code panel options

Change code languages, preprocessors and plugins.

  • CoffeeScript
  • JavaScript 1.7
  • Babel + JSX
  • CoffeeScript 2

script attribute

  • PostCSS (Stage 0+)
  • PostCSS (Stage 3+)
  • Tailwind CSS

Keep JSFiddle running. Whitelist us in your content blocker.

We've been providing web developers, educators, students, companies with JSFiddle free for many years .

Your can help us in one of two ways:

  • Whitelist JSFiddle in your content blocker
  • Go PRO and get access to additional PRO features →

Join the 4+ million users, and keep the JSFiddle dream alive.

All ads in the editor and listing pages are turned completely off.

Use pre-released features

You get to try and use features (like the Palette Color Generator) months before everyone else.

Fiddle collections

Sort and categorize your Fiddles into multiple collections.

Private collections and fiddles

You can make as many Private Fiddles, and Private Collections as you wish!

Debug your Fiddle with a minimal built-in JavaScript console.

Color Palette Generator

Generate a cool color palette with a few clicks, share or embed fiddle, customize the embeddable experience for websites, embed snippet prefer iframe :.

No autoresizing to fit the code

Render blocking of the parent page

Editor settings

Customize the behavior and feel of the editor.

Auto-run code

Only auto-run code that validates

Auto-save code

Auto-close HTML tags

Auto-close brackets

Live code validation

Highlight matching tags

Hot reload CSS NEW

Hot reload HTML NEW

Line numbers

Indent with tabs

Code hinting (autocomplete) (beta) -->

Console in the editor

Clear console on run

Your recent fiddles

Recentry created fiddles, including ones created while logged out, jsfiddle changelog, a log of all the changes made to jsfiddle – big and small., new jsfiddle 3.0.

The 3.0 updates brings a lot of changes, most notably a modern UI refresh.

There was an increadible amount of under-the-hood changes for the front-end, we've mostly moved away from pre-processors. The light/dark themes are using a modern light-dark() approach. The refactoring allows for more changes to be made in a spedier manner.

In the new sidebar you can find a modal window with Your recent fiddles (created while loggedn and or not), and a new place for our mini-apps (right now the Color Palette Generator)

In the new sidebar you can find our mini-apps (right now the Color Palette Generator)

System theme follows your OS settings

CSS Hot-reload - styles update immidietly as you type

HTML Hot-reload (experimental) - update HTML immidietly as you type

Results panel color follows the selected theme

Title and description are now a single field

Public Profile page is completelty redesigned and can be easily used as your code showcase

Groups are now Collections and we have big plans for them

Collections are completely redesigned

Users can now add groups straight from the editor

New Import fiddles as modules

Import fiddle code into other fiddles with Modules and Imports.

JS Modules: import [name] from '@jsfiddle/[username]/[fiddle].js'

CSS Import: @import url('@jsfiddle/[username]/[fiddle].css')

See how this works in this fiddle .

Change Fiddle listing shows latest version

The fiddle listings (Public, Private, Titled, etc) will now display latest versions instead of the ones saved as Base versions - this was causing more confusion than good, so we decided to change this long-standing behavior.

Change Evaluate code into the console

Custom Console beta is getting more stable and feature-rich. Just added the ability to evaluate code in the console.

New Console in the editor

Introducing the first beta of the editor console - it's going to show you logs, warnings, errors without the need of opening full devtools.

Console is avaialble for all users during beta, after that it'll be available for JSFiddle supporters.

New More user's social links (Dev.to, Stack Overflow, Medium)

You can add more of your social links `Settings / Social Media`, for Dev.to, Stack Overflow and Medium. These will be displayed on the profile section in Editor's sidebar and your public profile.

Change Refactored Unsaved Drafts feature

Unsaved drafts feature is completely rewritten with 100% fewer bugs and 10x more maintainable codebase – as the author of the previous one, I had hard times figuring out what it does 🥴

Add a new collection

Collect your fiddles in collections.

Become a Javascript Ninja

javascript problem solving online

Question Solve
Write a function that multiplies given number by 5? Number Easy
Write a function that checks whether given number is even? Number Easy
Write a function that checks whether given number is divisible by 5? Number Easy
Write a function that calculates factorial of given number? Number Medium
Write a function that sums from 1 to given number? Number Medium
Write a function to calculate the length of given string? String Easy
Write a function to count the number of vowels in given string? String Medium
Write a function to remove vowels from the given string? String Medium
Write a function to check whether given number is prime? Number Medium
Write a function to check whether given number is perfect square? Math Medium
  • 1 (current)

Practice JavaScript Online

Become a javascript ninja with javascript challenges.

Welcome to JavaScript Ninjas, your premier destination for mastering JavaScript online. Whether you're a novice or an experienced coder, our platform offers a dynamic environment to practice JavaScript online, tackle challenging coding challenges, and elevate your skills to ninja-level proficiency. With our curated collection of real-time JavaScript challenges, you'll have the opportunity to hone your coding prowess and become a true JavaScript Ninja. Join our community today and embark on your journey to becoming a coding master!

JS Tutorial

Js versions, js functions, js html dom, js browser bom, js web apis, js vs jquery, js graphics, js examples, js references, javascript exercises.

You can test your JavaScript skills with W3Schools' Exercises.

We have gathered a variety of JavaScript exercises (with answers) for each JavaScript Chapter.

Try to solve an exercise by editing some code, or show the answer to see what you've done wrong.

Count Your Score

You will get 1 point for each correct answer. Your score and total score will always be displayed.

Start JavaScript Exercises

Start JavaScript Exercises ❯

If you don't know JavaScript, we suggest that you read our JavaScript Tutorial from scratch.

Kickstart your career

Get certified by completing the course

Get Certified

COLOR PICKER

colorpicker

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: [email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail: [email protected]

Top Tutorials

Top references, top examples, get certified.

Level up your JavaScript skills with 10 coding challenges

Become a Software Engineer in Months, Not Years

From your first line of code, to your first day on the job — Educative has you covered. Join 2M+ developers learning in-demand programming skills.

The best way to learn to code in JavaScript is to practice, practice, practice. That’s why today we will go over 10 coding challenges to level up your JavaScript skills . These exercises are useful for any JavaScript developer. If you’re an absolute beginner, it will be helpful to check out our beginner’s guide before diving in.

JavaScript challenges can be difficult enough without us trying to make them harder for ourselves. One of the ways to make them easier is to follow principles outlined in a short book by George Polya called How To Solve It . These steps are as follows:

  • Understand the Problem
  • Make a Plan
  • Execute Plan
  • Refactor - is There a Way to Make it Better?

As we challenge ourselves in the next ten problems, keep these steps in mind. Keep in mind that there are several ways to solve these problems. As long as you can explain your thought-process in good detail, your answer is probably fine!

Today we will cover:

  • Longest String in Array
  • Most Commonly Used Char in String

Two Strings Are Anagrams of Each Other

String permutation is palindrome, balanced brackets, armstrong numbers, sorting objects, reverse a linked list.

  • Remove Kth-Node From Linked List
  • Cyclic Linked List

Wrapping up

Longest string in an array.

Write a function that accepts an array of strings. Return the longest string.

What is our Input?

  • String[] = an array of strings

What is our Output?

  • String = the longest of the strings in the array

Questions to ask the interviewer:

Do we need to consider if there are no strings in the array?

  • For this challenge, no

Do we need to consider times when all of the strings are the same length?

  • Yes. Return the first string.

Longest String Plan

For this problem, we need to:

  • Initialize and Declare Variable for Longest String
  • Loop through the array
  • Find the length of each string
  • Determine if that length is the largest we have seen so far.
  • Replace the longest/largest variable with the arr[index] as long as length is greater than the variable.
  • Return longest/largest string.

Possible Solution

Explanation.

There are two different ways listed here as a possible solution to this problem: one uses the ES5 Syntax and uses the ES6 Syntax.

In both solutions, we initially need to declare a longest variable and initialize it to an empty string.

In the ES5 solution, we are utilizing a traditional for loop structure to look at each index in the array. We are using the array method forEach to iterate over the array in the ES6 solution.

As we iterate through the data structure, we want to take a look at the length of each string. In JavaScript, we can do that with the length property.

In the ES5 solution, we utilized a conditional statement to see if the current ( arr[i] ) string’s length is longer than (but not equal to) the current longest string( longest ). The ES6 solution takes another approach with using the Math object property max as a shortcut for the conditional logic in the ES5 version.

If the string is longer, we assign it to the longest variable we already created.

Return the longest as our function’s terminal statement in both cases.

Most Commonly Used Character in String

Write a function that takes a string, and returns the character that is most commonly used in the string.

  • String = one String

What is Our Output?

  • String = the single character that shows up the most in the given string

Do we need to consider if there is no string given?

Do we need to consider times when more than one character shows up the same number of times?

  • No. Return the last one.

Most Used Char Plan

To find the character most often used in a string, we need to be able to count how many of each kind we have. We can do this using an object that has key:value pairs.

  • Define and Initialize an object
  • Map character count to that object.
  • Loop through the object to find the max count.
  • Assign new max count value to maxCharCount and new max key to maxChar .
  • Return maxChar

Create a charCount object. This object can be named whatever you’d like as long as it’s consistent.

Use a standard for loop to iterate through the string, and check to see if it exists in the charCount object. If it does, add 1 to CharCount[key] and reassign it to the same variable. The pipes here will cover any instance where the key does not yet exist in the object and initialize the count to 1.

Loop through the object using a for...in loop. This type of loop allows us to iterate over each property in an object to look at its value. In this instance we want to find the largest number.

The wording for this problem indicates that they want us to find the last max number (in the case there is more than one character with the same amount of appearances), so we use >= to reassign the maxChar if needed.

Return our maxChar .

Create a function that takes in two strings as two parameters and returns a boolean that indicates whether or not the first string is an anagram of the second string.

  • String , String = two Strings
  • Boolean are either true or false . True if they are anagrams of each other, and false if they are not.

What is an anagram?

  • An anagram is another word or phrase formed by rearranging letters of the first word or phrase.

Do we need to consider whitespace?

  • Trim whitespace prior to comparison.

Anagrams Plan

If an anagram is just a bunch of letters jumbled around, we can see if the strings are anagrams of each other by:

Comparing the length: if they are not same length, they are not an anagram of the other

Sorting the string and using an equality operator to see if it’s equal.

There are a couple of different ways to solve this problem.

  • Compare the length of the first string to the length of the second string. If they are not equal, return false .
  • If the strings pass the initial check, we sort each individual string, assign it to a variable, and then return the result of setting the variables equal to each other. If they are equal, it will return true . If not, it will return false .

This particular solution considers white space by sorting it to the end of the string, so it doesn’t necessarily matter if it’s counted or not.

Given a string, write a function that will return whether or not that string is a palindrome.

  • Boolean means either true or false . true if string is a palindrome; false if it is not.
  • Do not trim whitespace.

Does the palindrome need to be in the dictionary?

  • No, it does not.

Palindromes Plan

  • Reverse the string. We need to keep the old reference to the string to use later. To do this, we need to split string into an array.
  • Reverse the string.
  • Join the string.
  • See if new variation of string is equal to an old variation of string.

This one is deceptively simple. You just need to have knowledge of array methods and how to work with strings in conjunction with those methods. Practice how this could possibly be done without the methods so you know how these methods work under the hood.

Keep the learning going.

Learn JavaScript without scrubbing through videos or documentation. Educative’s text-based courses are easy to skim and feature live coding environments, making learning quick and efficient.

The Complete Guide to Modern JavaScript

Given a string possibly containing three types of braces ( {} , [] , () ), write a function that returns a Boolean indicating whether the given string contains a valid nesting of braces.

  • Boolean means either true or false . true if string has balanced brackets; false if it does not.

What do you mean by balanced brackets?

  • A string is considered balanced if it has as many opening brackets of a given type as it has closing brackets of that same type. No bracket can be left unmatched. A closing bracket also cannot match a corresponding opening bracket that comes after it. Brackets also cannot overlap each other.

Will the string only have brackets in it?

  • No. All chars can be used.

Balanced Brackets Plan

Because we are looking for nested balanced brackets, we are looking to use a data structure to store the open brackets we have seen so far.

As we come to a closing bracket, we need to look to see if the last bracket added to the data structure matches the opposite of the current bracket.

If your data structure is empty by the time we get to the end of the string, we have balanced brackets.

The process for this particular problem is more about checking for failures. We use a data structure called a stack that takes a first in, last out approach to do that.

When we come across an open bracket, we push it on to the stack. When we come across a closed one, we check to see if the last index of the stack is the opposite the current character.

If the stack is empty by the time we get to the end of our logic, we have balanced brackets.

An Armstrong number is an n-digit number that is equal to the sum of the n t h nth n t h powers of its digits. Determine if the input number is an Armstrong number. Return either true or false.

  • Number = n-digit number
  • Boolean means either true or false . true if number is Armstrong Number; false if it is not.

May I have an example please?

  • 1 3 + 5 3 + 3 3 = 153 1^3 + 5^3 + 3^3 = 153 1 3 + 5 3 + 3 3 = 153

Armstrong Number Plan

Remember that in JavaScript type coercion exists. When working with Numbers is JS, remember to check the typeof the number. If it is a string, you’ll need to plan for that. This is really important when working with math in JS.

To solve this problem, we change the number to a string, figure out the power by getting the length of the number, and then use a for loop to add up the individual numbers ^ length of the number passed in.

We then check to see if the sum is equal to the original number. If it is, it is an Armstrong number.

Given an array of objects, sort the objects by population size. Return the entire object.

  • An array of objects
  • An array of objects, sorted by population

SortObjects Plan

JavaScript has a built-in array method called sort() that we can use for this particular exercise.

What’s interesting about this particular method is that in JavaScript, if you don’t use a callback compare function to sort the array of objects, the default sort method is used to sort by characters rather than number. For example:

We need to use a compare function as a callback passed into the sort method to make sure that the actual numbers are treated properly.

To sort an array of objects by a certain property, we have to use the compare function as a parameter in the built-in sort method in JavaScript.

The compare function takes in two parameters: here they are named a and b . They represent two objects next to each other in our array. If a and b are both objects, we can use dot notation to access the property population .

If we want to be sure that the array has objects sorted by population in increasing order, we evaluate a.population - b.population . If it’s -1, it will put the list in decreasing order by population. The opposite would put it in increasing order. If the expression happens to evaluate to 0, it means that the two patterns are equal to the other.

Create a Node class and a LinkedList class with these methods:

  • insertFirst(data)
  • insertLast(data)
  • Nothing. We are building two classes from scratch that have methods.
  • This is a class that will create instances of a LinkedList. We will use it to test the reverse a linked list functionality.

Questions to Possibly Ask Interviewer

Are we to assume this is a singly-linked list that actually exists?

  • No. Handle all possible errors if you can.

Reverse a Linked List Plan

The first thing we need to investigate is how a linked list works. Once we have that figured out, it might be a lot easier to write out the code for it.

Linked lists are different from arrays in that they don’t require a continuous place of residence in memory. Linked Lists can be broken up into single nodes if needed as long as the linked list’s next value is not null.

Let’s plan to initialize three variables: prev as NULL, curr as head, and next as NULL. Iterate trough the Linked List. In a while loop, do the following.

  • Store next node
  • next = curr.next
  • Change next of current (this is where the reversing happens)
  • curr.next = prev

We start with the Node class. It will have a data property and a next property. The next property acts as a pointer that will direct us to the next node in our linked list if it exists, or null.

For the Linked List class, we check for failures in our methods before we handle the success. With Linked Lists, we will check to see if the actual list exists by checking to see if the head exists and perform the appropriate logic for each method.

When we reverse a linked list, juggling variables around is the rule of the day. We have one variable, node, that is declared and then initialized to head. We declare tmp and prev without initializing them.

While the node exists, we redirect the pointers by reassigning variables. The result is a reversed linked list.

Remove Kth-Node from Linked List

Using the Node and LinkedList classes that you created in the previous question, add methods to it so that, when given an kth-integer, you can delete that k t h kth k t h node from the linked list

  • We will add to the Linked List and Node classes that were written in the previous question.
  • This is a class that will create instances of a LinkedList. We will use it to test delete a k t h kth k t h -node functionality.

Is this a zero-based indexing?

LinkedList Delete K-th Node Plan

When given K we have to be able to delete that node in a linked list. To handle edge cases, we need to have some knowledge of the size of the list, the node prior to the Kth node and the node after the Kth node. We essentially need to redirect the pointers for those nodes to not include the one we want to be deleted.

To do that, we’ll loop through the list, keep track of which node we’re on, and change the pointers to skip the Kth-node. It’ll still be in memory, ready to be written over, but it will be essentially deleted from our list.

Circular Linked List

Given a linked list, return true if the list is circular, false if it is not.

  • A new LinkedList()

A Boolean that tells us if the linked list is circular or not.

What does it mean for a linked list to be circular?

  • It means that a next node value could point to a node that we have already seen in our linked list.

We will have two pointers: one slow and one fast. The fast one will move twice as much as the slow one on each iteration. If it comes to be that the fast.next.next value doesn’t exist, we can assume it’s a linear linked list. If the slow pointer and the fast pointer ultimately end up equal, we know we have a circular component to our list.

Here we declare and initialize two pointers, one slow and one fast, that are both pointed at the head. While the next two nodes exist, we’ll reassign the pointers: the slow will move to the next node and the fast will move two nodes.

If the slow ever is the same value as the fast, we have a circular linked list. If ever one of the two nodes past the current node doesn’t exist, we’ll break the loop and return false.

Congrats! You’ve gone through 10 JavaScript coding challenges! One of the best things to do when encountering a problem is to use Georges Polya’s practices. Once we understand the problem, we make a plan and try to reiterate an unsolved problem. This way, you are more likely to break down the problem into smaller manageable components.

Solving these problems takes practice. You’ll develop an intuition for algorithms the more time you put into practicing. So don’t worry if it doesn’t come to you right away. Keep practicing!

Educative’s course The Complete Guide to Modern JavaScript walks you through the basics of the language and all the new features introduced up to 2020. After following this course, functions and variables let , const , generators, promises and async won’t be a problem anymore.

Continue reading about JavaScript

  • JavaScript Snake Game Tutorial: build a simple, interactive game
  • Ace the top JavaScript design patterns for coding interviews
  • 15 JavaScript Tips: best practices to simplify your code

Learn in-demand tech skills in half the time

Mock Interview

Skill Paths

Assessments

Learn to Code

Tech Interview Prep

Generative AI

Data Science

Machine Learning

GitHub Students Scholarship

Early Access Courses

For Individuals

Try for Free

Gift a Subscription

Become an Author

Become an Affiliate

Earn Referral Credits

Cheatsheets

Frequently Asked Questions

Privacy Policy

Cookie Policy

Terms of Service

Business Terms of Service

Data Processing Agreement

Copyright © 2024 Educative, Inc. All rights reserved.

Uploaded avatar of ghjk

Practice 148 exercises in JavaScript

Learn and practice JavaScript by completing 148 exercises that explore different concepts and ideas.

Explore the JavaScript exercises on Exercism

Unlock more exercises as you progress. They’re great practice and fun to do!

15 Best Platforms To Practice JavaScript self.__wrap_b=(t,n,e)=>{e=e||document.querySelector(`[data-br="${t}"]`);let s=e.parentElement,r=R=>e.style.maxWidth=R+"px";e.style.maxWidth="";let o=s.clientWidth,i=s.clientHeight,c=o/2-.25,l=o+.5,u;if(o){for(;c+1 {self.__wrap_b(0,+e.dataset.brr,e)})).observe(s)};self.__wrap_b(":Rid9j6:",1)

Mujahid Khan H A's profile image

HackerEarth

Freecodecamp, geeksforgeeks, educative.io, codeacademy, javascript questions – by lydia hallie, javascript coding practice – by learning zone, 123 essential javascript questions – by yuri katkov, javascript interview question – by sudheer j.

15 Best Platforms To Practice JavaScript

Learning any programming language is not enough, and we need to practice.

If you are learning JavaScript, I have curated the ten best platforms to practice JavaScript for free.

javascript problem solving online

Codedamn is an interactive programming platform; you will learn and build projects side by side. It offers over 500+ coding problems for you to practice.

You can solve 3-5 questions daily without waiting another day to solve more questions.

Codedamn has community support, if you get stuck on a particular problem, you can ask for help, and developers will be ready to help you anytime.

The problem’s difficulty level ranges from easy to hard. But you can go at your pace.

Here is the link to solve 500+ JavaScript problems .

If you think these problems are too advanced, you can learn about JavaScript basics, which codedamn offers for free.

Link to learn JavaScript: JavaScript basics

javascript problem solving online

On codewars, you will get all types of questions ranging from easy to complex.

You will get instant feedback on your answers. Your rank will level up as you progress.

If you get stuck, codewars have a senior developers community that will help you.

Link to practice on codewars

javascript problem solving online

codin games is a gamified learning platform. On codin games, you will code and execute the correct code to save yourself from obstacles and enemies.

You can compete individually or by teaming up with other fellow developers.

You can compare your and other developer code to improve your JavaScript coding skills.

You can play and build your developer profile, and You can even apply for jobs. You need to solve complex problems and be consistent on the platform to stand out from others.

Link to practice on the codin game.

If you don’t know Solo Learn, you are not a developer. Earlier, Solo learn was only available as a mobile application, and now you can also learn on the web.

Solo learn offers a JavaScript course and exercise to improve your JavaScript coding skills.

At the end of each topic, you will get practice problems you need to solve to unlock the next section.

Link to practice on Solo learn .

javascript problem solving online

Edabit has interactive exercises ranging from easy to complex, and you can filter the challenges using tags. You can practice your JavaScript coding skills for free.

If you get stuck on any question, you can unlock the solution, but you will lose the XPs you have gained.

Alternatively, the resources tab contains the concepts to learn to solve that problem.

Link to practice JavaScript at edabit.

javascript problem solving online

Hacker earth has a set of questions based on if you are preparing for an interview or you are a beginner at programming ,

It has a codemonk section where you will get questions based on Data Structures and algorithms. Best suited if you know DSA and algorithms, or you can practice easy and medium-difficulty problems.

On hacker earth, you can participate in challenges, try to build your developer profile, and stand out from other developers. And apply for jobs at companies.

Link to practice at HackerEarth

javascript problem solving online

On programiz, you can practice JavaScript for free, and You will get the list of concepts to learn and practice problems at the end of each concept to retain what you have learned.

There are separate JavaScript examples sections available there, and you will find the JavaScript-related question and some general programming questions based on the topics you have learned.

Link to practice JavaScript examples at programiz.

javascript problem solving online

Freecodecamp is popular among developers because of its ocean of totally free courses.

Freecodecamp offers 100s of exercises related to JavaScript, ranging from basic concepts, regular expressions, array methods, objects, data structure, and algorithms.

These exercises are for beginners to advanced javascript developers.

Link to practice on freecodecamp

javascript problem solving online

To practice on GeeksforGeeks, you need to create an account once you create an account with them, head over to the below link to practice JavaScript.

This platform best suits you if you have Data Structure and algorithms knowledge.

You can filter out the problems based on the companies that have asked about that problem or on the concepts like Arrays, Objects, and Strings.

You can even choose the problem difficulty level from school to pro level.

Link to practice on GeeksforGeeks

javascript problem solving online

The Educative has an assessment test. You can take the JavaScript assessment test, which takes around 20 minutes to complete.

The assessment test consists of all the topics, from fundamental concepts like variables, data types, and conditional statements to advanced concepts like arrays and objects.

Link to the assessment test

javascript problem solving online

On Codecademy, you will find a javascript project-based course that is very helpful if you want to learn and build projects at the same time using javascript.

Link to javascript courses

I have curated four GitHub repositories that are helpful. You will gain problem-solving skills, and some repositories will help you prepare for the interview.

This repo has more than 500+ questions with answers, and this repo is available in 18 other languages. In this repo, you will find basic to very advanced questions, and some are very difficult.

Link to repo

This repo has more than 100+ javascript exercises with the answers. This repo will give you insights into How the recruiter will ask questions in a javascript-related interview.

You will find 123 essential javascript interview-related questions, which you can practice on your code editor or online to crack practical interviews. This repo has 4K stars, and you will find some exciting questions that might help you build problem-solving skills.

You will find 1000+ questions ? related to javascript on this repo, which you can practice. Questions range from the difficulty level of beginners to advanced.

I hope you found this article helpful, You can choose any platform and practice it to improve your developer profile, gain problem-solving skills and move to the next platform.

Thanks for reading.

Sharing is caring

Did you like what Mujahid Khan H A wrote? Thank them for their work by sharing it on social media.

No comment s so far

Curious about this topic? Continue your journey with these coding courses:

Course thumbnail for Practice JavaScript by building 10+ real projects

719 students learning

Photo of Laurence Svekis

Laurence Svekis

Practice JavaScript by building 10+ real projects

Course thumbnail for JavaScript from Zero to Hero with 5+ projects

157 students learning

Photo of DINESH KUMAR REDDY

DINESH KUMAR REDDY

JavaScript from Zero to Hero with 5+ projects

Course thumbnail for Mastering Advanced JavaScript

133 students learning

Photo of Shubham Sarda

Shubham Sarda

Mastering Advanced JavaScript

JavaScript Online Compiler

* PlayCode has users with official emails from these companies.

Our JavaScript online Compiler is the perfect solution for beginner developers looking to streamline their workflow and improve productivity. With our cutting-edge online editor, you can write, compile, and view the live results of your code all in one place. Our JavaScript Compiler is designed to make your life easier, whether you're a seasoned developer or just starting out.

The JavaScript Online Compiler offers an intuitive user interface, making it easy for beginners to learn and practice their coding skills. With ready-to-use templates, you can quickly kick-start your projects and learn by example. These templates cover a wide range of topics and are tailored to help you grasp essential JavaScript concepts effortlessly.

One of the key features of our JavaScript Online Compiler is the live view coding result. As you write your code, you can instantly see the outcome, making debugging and testing a breeze. This real-time feedback allows you to iterate faster and catch errors before they become a headache.

In addition to the live view, our JavaScript Compiler offers a rich library of resources to help you level up your coding skills. With comprehensive documentation, video tutorials, and a thriving community of developers, you'll never feel lost or unsupported.

Don't waste any more time juggling between different tools and platforms. Give our JavaScript Compiler a try and experience the convenience of coding, compiling, and viewing your JavaScript projects all in one place. Join thousands of satisfied developers who have already discovered the power and efficiency of our JavaScript Online Compiler. Get started today and unlock your full potential as a JavaScript developer!

Multiplayer

Collaborate with your team in real-time. Make coding interviews, teach students or your coworker.

NPM Packages

Play with any of the 2 million NPM packages. React, Vue, Lodash, RxJs, p5.js, three.js, etc.

The Fastest Live View

See results as you type, instantly. Speed-up learning and code debugging. PlayCode is the fastest coding experience ever.

Code Autocomplete

Type code faster and easier with smart code autocomplete. It helps avoid looking for documentation every time and it adds confidence in your coding abilities.

javascript problem solving online

Emmet Shortcuts

Emmet will make your HTML & CSS coding unbelievable smooth and fast. Type less work faster. You have to try it!

PlayCode will find and show you all the errors and help you fix them. It makes the process of "write, run, fix errors, again" instant.

Type Checking

Use the full power of TypeScript. Catch errors early. See typings and issues in the editor. Typings install automatically.

Documentation On Hover

The documentation is at your fingertips. No need to Open Google and constantly look for how to use this or that function.

Find errors instantly, even when you have 1000 lines of code. The minimap will show all errors and warnings.

Preview in a New Window

Use the new browser window to debug the result. Check responsive websites or use multiple monitors.

Upload images, videos, sounds, or any other file formats.

The Most Flexible Layout

Arrange the panels as you like. No, really, absolutely, whatever. Any location and size.

Color Themes

Light theme in the sun or dark in the evening. Switch between blue, dark, light and gray themes.

PlayCode languages

Javascript Compiler

PlayCode's JavaScript compiler supports REPL for JavaScript, TypeScript, and JSX code out of the box. No need to install anything, just start coding!

Javascript Online

Edit and run JavaScript online right in your browser and see the results instantly. PlayCode's JavaScript online editor offers a seamless experience for quick prototyping and testing.

HTML, CSS, JS Integration

Not just limited to JavaScript, PlayCode also supports HTML and CSS, allowing you to build complete web projects.

Create multiple JS files, use preprocessors, save your code, format, and customize the editor to fit your needs.

Build apps, demos, or amazing projects with the JavaScript compiler. Share your JS code by simply copying the browser URL.

Use console to debug javascript code in playcode.

In addition to supporting core JavaScript, PlayCode JavasScript Compiler also provides access to popular libraries and frameworks such as jQuery, Angular, and Backbone.js. This allows you to expand your skillset and explore a variety of tools and technologies commonly used in web development.

The javascript compiler supports creating whole apps with HTML, CSS, version control, and app hosting using Vanilla Names. It also includes a JavaScript console for debugging and the ability to use JavaScript and CSS npm packages such as Vue.js, React, Lodash, RxJS, Solid-js, and many more.

With PlayCode, you can join a vibrant community of JavaScript enthusiasts, developers, and learners. Share your projects, seek help, and learn from others' experiences, making your journey into JavaScript a collaborative and engaging experience.

Kata Library: JavaScript Practice

  • Collections

Status: Testing & feedback needed

Collect: kata.

Loading collection data...

You have not created any collections yet.

Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.

Get started now by creating a new collection .

Set the name for your new collection. Remember, this is going to be visible by everyone so think of something that others will understand.

Javascript-challenges

You are registered for the contest.

Sweet, we've sent you an email confirming your registration!

You can tell your friends about javascript-challenges.

javascript problem solving online

You might like to solve practice problems on HackerRank.

  • Please refrain from discussing strategy during the contest.
  • All submissions are run through a plagiarism detector. Any case of code plagiarism will disqualify both users from the contest.
  • You can also code using our interface, which currently supports over 40 major languages. Learn about our environment and time limits here . If you are not yet familiar with our platform, check out Solve Me First to acquaint yourself with I/O.
  • HackerRank admin decisions are final .
  • Each challenge has a pre-determined score.
  • Your score for a problem depends on the number of test cases your submission successfully passes.
  • A participant's total score is the sum of the scores earned for each problem attempted. If you submitted more than one solution for a problem, only your highest score achieved will be used in this calculation.
  • Participants are ranked by score, with the cumulative time taken (between the contest's start time and the time of your correct submission) used to break ties.

Not a genuine coding contest? Report here

Report Contest

Why are you reporting this contest?

  • Privacy Policy
  • Environment
  • For Schools
  • Try for Free
  • Terms of Service

(415) 900-4023

© 2024 HackerRank

Something went wrong!

Some error occured while loading page for you. Please try again.

17 JavaScript for/while loop exercises with solutions

1. write a js code to print numbers from 1 to 10.

Function `printNumbers()` prints numbers from 1 to 10 using for loop.

2. Write a JS code to print a 2D array

3. write a js code to print even numbers in given array.

Function `printEven()` prints all the even numbers of a 2D array using for loops and ‘%’ operator.

4. Write a JS code to delete all occurrence of element in given array

Function `deleteElement()` deletes all the occurrence of element from the given array.

5. Write a JS code to demonstrate Async loop

For loop consisting of setTimeout() function to print loop variable 5 times in asynchronous way.

6. Write a JS code to find the power of a number using for loop

Function numPower() to returns power of number for provided exponential value using for loop.

7. Write a JS code to print a pattern using for loop

Function printPattern() is used to print a pattern for a given range using nested for loop.

8. Write a JS code to find the no of digits in a number

Function digitCount() to returns the number of digits in a given number using while loop.

9. Write a JS code to calculate the sum of digits in a number

10. write a js code to find the largest number in an array.

Program to find the largest number in the given 1D array. 

11. Write a JS code to find the number of zeros in 2D Matrix

12. write a js code to find product of two arrays.

Function findProd() to generate a new array which is the product of two arrays of the same size using for loop.

13. Write a JS code to print the Fibonacci series for a given value of N

The function fibonacci() prints the Fibonacci series for the given range N using While loop.

14. Write a JS code to find N value in the Fibonacci series for a given number

The function Findfibonacci() prints the index of number in the Fibonacci series if present or “element not present” if the number is not part of the Fibonacci series.

15. Write a JS code to count all letters in a word

16. write a js code to find duplicate values in a given array.

Function findDup() to returns all the elements that are repeated more than once in a given array.

17. Write a JS code for binary search algorithm

JavaScript Loop tutorials

javascript problem solving online

Related Articles

IMAGES

  1. Problem Solving for Developers

    javascript problem solving online

  2. JavaScript Problem Solving, Problem: 02. Variable.js Problem

    javascript problem solving online

  3. JavaScript Easy To Learn || Problem Solving

    javascript problem solving online

  4. Problem Solving with JavaScript

    javascript problem solving online

  5. GitHub

    javascript problem solving online

  6. 001 JavaScript Problem Solving

    javascript problem solving online

VIDEO

  1. Problem solving with JavaScript #javascript #coding

  2. javascript problem solving question #7 @CodeHelp

  3. Creating an Interactive Sliding Puzzle Game with HTML, CSS, and JS

  4. Javascript Array of object basic problem solving 3

  5. Daily JavaScript Problem Solving

  6. 4- Find the odd int

COMMENTS

  1. Free Javascript challenges online

    JSchallenger recognizes what skill level you're on and adjusts the difficulty of the next challenges automatically. Making you continuously improve your Javascript skills in a short amount of time. JSchallenger. Free Javascript challenges. Learn Javascript online by solving coding exercises. Javascript for all levels.

  2. Free JavaScript Challenges online ‒ JSCodebox

    Solve free JavaScript challenges online. Earn experience and share your solutions with other programmers. Free and without required login!

  3. Practice JavaScript

    Practice JavaScript online with our set of coding problems selected for beginners. Solve these JavaScript coding problems and prepare for your interviews. Courses. Learn Python 10 courses. Learn C++ 9 courses. Learn C 9 courses. Learn Java 9 courses. Learn Javascript 9 ...

  4. 2,500+ JavaScript Practice Challenges // Edabit

    Practice JavaScript coding with fun, bite-sized exercises. Earn XP, unlock achievements and level up. It's like Duolingo for learning to code.

  5. JavaScript Online

    JavaScript Online: practice JavaScript for fun or technical interviews. ... Solve problems and test them online immediately! Toggle navigation JavaScript Online. Random Problem; List of problems; Resources; Contact; Practice JavaScript for Fun or Technical Interviews. Practice with a growing collection of programming puzzles and problems, and ...

  6. JavaScript Exercises, Practice Questions and Solutions

    Benefits of Practice JavaScript. Master JavaScript through engaging exercises that offer: Hands-on learning with interactive quizzes. Progress tracking to monitor your improvement. Effective skill enhancement at your own pace. Immediate feedback for quick learning. Access anytime, anywhere for convenient learning.

  7. 12 JavaScript Code Challenges for Beginners

    6. Sort an array from lowest to highest. You could create a function for this solution as well, but be sure to try your program with varying lengths and types of arrays. Try one with all integers, another with negative numbers, and another with decimals. 7. Create a function that filters out negative numbers.

  8. JavaScript on Exercism

    Code practice and mentorship for everyone. Develop fluency in 73 programming languages with our unique blend of learning, practice and mentoring. Exercism is fun, effective and 100% free, forever. Get fluent in JavaScript by solving 148 exercises. And then level up with mentoring from our world-class team.

  9. Open Challenge

    Master JavaScript with Open Challenge! Improve your skills and become a better developer by solving coding exercises online. Whether you're a beginner or an advanced developer, we have exercises for everyone! Join a community of thousands of satisfied people from different countries who are already learning with us!

  10. List of Problems

    JavaScript Online: practice JavaScript for fun or technical interviews. This page contains the list of all available problems to solve.

  11. Problems

    Our platform offers a range of essential problems for practice, as well as the latest questions being asked by top-tier companies. Explore; Problems; Contest; Discuss; Interview. Store Study Plan. See all. Array 1737. String 721. Hash Table 625. Dynamic Programming 528. Math 522. Sorting 414. Greedy 380. Depth-First Search 295. Database 283 ...

  12. JSFiddle

    We've been providing web developers, educators, students, companies with JSFiddle free for many years.. Your can help us in one of two ways: Whitelist JSFiddle in your content blocker; Go PRO and get access to additional PRO features →

  13. Javascript Ninjas

    Welcome to JavaScript Ninjas, your premier destination for mastering JavaScript online. Whether you're a novice or an experienced coder, our platform offers a dynamic environment to practice JavaScript online, tackle challenging coding challenges, and elevate your skills to ninja-level proficiency. With our curated collection of real-time ...

  14. Learn JavaScript

    The easiest way to learn & practice modern JavaScript. Join more than 200,000 learners across all courses. Try it out →. Learn JavaScript is the easiest, most interactive way to learn & practice modern JavaScript online. Read short lessons, solve challenges & answer flashcards.

  15. JavaScript Exercises

    With our online code editor, you can edit code and view the result in your browser. Videos. Learn the basics of HTML in a fun and engaging video tutorial ... for each JavaScript Chapter. Try to solve an exercise by editing some code, or show the answer to see what you've done wrong. Count Your Score. You will get 1 point for each correct answer ...

  16. Level up your JavaScript skills with 10 coding challenges

    The best way to learn to code in JavaScript is to practice, practice, practice. That's why today we will go over 10 coding challenges to level up your JavaScript skills. These exercises are useful for any JavaScript developer. If you're an absolute beginner, it will be helpful to check out our beginner's guide before diving in.

  17. JavaScript exercises on Exercism

    Code practice and mentorship for everyone. Develop fluency in 73 programming languages with our unique blend of learning, practice and mentoring. Exercism is fun, effective and 100% free, forever. Explore the 148 JavaScript exercises on Exercism.

  18. 15 Best Platforms To Practice JavaScript

    The problem's difficulty level ranges from easy to hard. But you can go at your pace. Here is the link to solve 500+ JavaScript problems. If you think these problems are too advanced, you can learn about JavaScript basics, which codedamn offers for free. Link to learn JavaScript: JavaScript basics. Codewars

  19. Solve Tutorials

    Improve your Javascript basics. Join over 23 million developers in solving code challenges on HackerRank, one of the best ways to prepare for programming interviews.

  20. JavaScript Online Compiler

    The JavaScript Online Compiler offers an intuitive user interface, making it easy for beginners to learn and practice their coding skills. With ready-to-use templates, you can quickly kick-start your projects and learn by example. These templates cover a wide range of topics and are tailored to help you grasp essential JavaScript concepts ...

  21. JavaScript practice challenges

    Disemvowel Trolls. 346,830 osuushi 4 Issues Reported. Strings. Regular Expressions. Fundamentals. Practice JavaScript coding with code challenges designed to engage your programming skills. Solve coding problems and pick up new techniques from your fellow peers.

  22. Programming problems and Competitions

    Your score for a problem depends on the number of test cases your submission successfully passes. A participant's total score is the sum of the scores earned for each problem attempted. If you submitted more than one solution for a problem, only your highest score achieved will be used in this calculation. Participants are ranked by score, with ...

  23. 17 JavaScript for/while loop exercises with solutions

    8. Write a JS code to find the no of digits in a number. Function digitCount () to returns the number of digits in a given number using while loop. function digitCount(num) {. var count=0; //return 1 for pow=0. while(num!=0){. num=Math.floor(num/10); count++;