One of the best ways to learn a programming language is to solve practice problems and exercises. This page has examples and exercises on various concepts of JavaScript. It is advised that you try to solve these examples on your own and then check the provided solution.

- How to add two numbers in JavaScript?
- How to add two numbers using textbox in JavaScript?
- How to swap two numbers without using third variable in JavaScript?
- How to swap two numbers using JavaScript?
- JavaScript program for calculating the square root of a number
- How to calculate the area of a triangle in JavaScript?
- JavaScript program to calculate the area of a circle
- How to find the area and perimeter of a rectangle in JavaScript?
- JavaScript program to list the properties of a JavaScript object
- How to convert string to float in JavaScript?
- How to convert a string to a number in JavaScript?
- How to add commas to a number in JavaScript?
- How to format number as currency string using JavaScript?
- How to format float to 2 decimal places in JavaScript?
- How to convert Celsius to Fahrenheit using JavaScript?
- JavaScript program to convert Fahrenheit to Celsius
- How to create a temperature converter in HTML and JavaScript?
- How to check if a number is positive or negative in JavaScript?
- JavaScript program to check if a number is zero
- How to check if a number is odd or even in JavaScript?
- Prime number program in JavaScript
- JavaScript program to print all prime numbers from 1 to 100
- Sum of prime numbers from 1 to 100 in JavaScript
- Print prime numbers between two numbers in JavaScript
- How to convert Kilometers to Miles using JavaScript?
- How to generate a random number in JavaScript?
- How to get the decimal part of a number in JavaScript?
- How to get the value before the decimal point in JavaScript?
- How to get the number of digits before the decimal in JavaScript?
- How to remove the digits after the decimal in JavaScript?
- How to count the number of digits in a string using JavaScript?