JavaScript ยท Practice
JavaScript exercises
9 exercises: 5 easy, 4 medium and 0 hard. Each has a starter file, examples, hints and a solution you can reveal, and your program is checked against every test case. Everything runs in your browser.
- Cafe bill totalEasy
Read prices and quantities, then print a JavaScript cafe bill total with exactly two decimal places.
BasicsNot started
- Cold-room alertEasy
Classify a sensor reading with JavaScript if, else if and exact boundary handling.
ConditionsNot started
- Deduplicate article tagsEasy
Remove repeated tags while preserving first-seen order using JavaScript arrays and includes.
ArraysNot started
- Headline to URL slugEasy
Normalise a simple headline into a lowercase hyphenated URL slug with JavaScript string methods.
StringsNot started
- Shipping fee functionEasy
Write and call a JavaScript function that calculates shipping from weight and distance.
FunctionsNot started
- Longest open runMedium
Scan a status string and find its longest consecutive open period with a JavaScript loop.
LoopsNot started
- Ticket code countsMedium
Count repeated support codes with a JavaScript object and print a sorted frequency report.
ObjectsNot started
- Validated score averageMedium
Validate score tokens in JavaScript and average only finite numeric readings without hiding bad input.
Error HandlingNot started
- Warehouse movement tallyMedium
Aggregate warehouse movements by item and print sorted totals with a JavaScript object.
ObjectsNot started