JavaScript - Exercises, Practice, Solution
What is JavaScript?
JavaScript is a cross-platform, object-oriented scripting language. It is a small and lightweight language. Inside a host environment ( a web browser), JavaScript can be connected to the objects of its environment to provide programmatic control over them.
JavaScript contains a standard library of objects, such as Array, Date, and Math, and a core set of language elements such as operators, control structures, and statements. Core JavaScript can be extended for a variety of purposes by supplementing it with additional objects.
The best way we learn anything is by practice and exercise questions. We have started this section for those (beginner to intermediate) who are familiar with JavaScript. Hope, these exercises help you to improve your JavaScript coding skills. Currently following sections are available, we are working hard to add more exercises. Happy Coding!
List of JavaScript Exercises :
- JavaScript Basic [ 150 Exercises with Solution ]
- JavaScript Fundamental (ES6 version) [ 150 Exercises with Solution ]
- JavaScript Fundamental (ES6 version) [ 116 Exercises with Solution ]
- JavaScript Functions [ 29 Exercises with Solution ]
- JavaScript Recursion [ 9 Exercises with Solution ]
- JavaScript Conditional Statements and loops [ 12 Exercises with Solution ]
- JavaScript Array [ 41 Exercises with Solution ]
- JavaScript Date [ 53 Exercises with Solution ]
- JavaScript String [ 49 Exercises with Solution ]
- JavaScript Math [ 53 Exercises with Solution ]
- JavaScript Validation with Regular expression [ 20 Exercises with Solution ]
- JavaScript HTML DOM [ 13 Exercises with Solution ]
- JavaScript Drawing [ 6 Exercises with Solution ]
- JavaScript Object [ 18 Exercises with Solution ]
- JavaScript Basic Validation without Regular expression [10 Exercises with Solution ]
- JavaScript Searching and Sorting Algorithm [14 Exercises with Solution ]
More to Come !
Note : Since JavaScript is a loosely-typed, dynamic and expressive language, you may accomplish the same task in various ways. Therefore the ways (solution of the exercises) described here are not the only ways to do stuff. Rather, it would be great, if this helps you anyway to choose your own methods.
[ Want to contribute to JavaScript exercises? Send your code (attached with a .zip file) to us at w3resource[at]yahoo[dot]com. Please avoid copyrighted materials.]
JavaScript: Tips of the Day
JavaScript: Destructuring with Aliases
The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables. Rather than sticking with the existing object variable, we can rename them to our own preference.
const object = { number: 10 }; // Grabbing number const { number } = object; // Grabbing number and renaming it as otherNumber const { number: otherNumber } = object; console.log(otherNumber); //10
Ref: https://bit.ly/3adlwNy
- New Content published on w3resource:
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- React - JavaScript Library
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework