JavaScript Tutorials and Examples

Java tutorials for Beginners – Java EnumMap

Hits: 55 (Java programming Example for Beginners) Java EnumMap In this tutorial, we will learn about the Java EnumMap class and its operations with the help of examples. The EnumMap class of the Java collections framework provides a map implementation for elements of an enum. In EnumMap, enum elements are used as keys. It implements the Map interface. Before we …

JS Example for Beginners: JavaScript Program to Compare The Value of Two Dates

Hits: 13 (JavaScript programming Example for Beginners) JavaScript Program to Compare The Value of Two Dates In this example, you will learn to write a JavaScript program that will compare the values of two dates.   Example: Compare Value of Two Dates // program to compare value of two dates // create two dates let …

JS Example for Beginners: JavaScript Program to Count the Number of Vowels in a String

Hits: 248 (JavaScript programming Example for Beginners) JavaScript Program to Count the Number of Vowels in a String In this example, you will learn to write a JavaScript program that counts the number of vowels in a string. The five letters a, e, i, o and u are called vowels. All other alphabets except these 5 vowels are called consonants. Example …

JS Example for Beginners: JavaScript Program to Convert the First Letter of a String in to Upper Case

Hits: 5 (JavaScript programming Example for Beginners) JavaScript Program to Convert the First Letter of a String in to Upper Case In this example, you will learn to write a JavaScript program that converts the first letter of a string into uppercase. Example 1: Convert First letter to Upper Case // program to convert first …

JS Example for Beginners: JavaScript Program to Reverse a String

Hits: 41 (JavaScript programming Example for Beginners) JavaScript Program to Reverse a String In this tutorial, you will learn to write a JavaScript program that reverses a string. Example 1: Reverse a String using for loop // program to reverse a string function reverseString(str) { // empty string let newString = “”; for (let i …

JS Example for Beginners: JavaScript Program to Convert Decimal to Binary

Hits: 42 (JavaScript programming Example for Beginners) JavaScript Program to Convert Decimal to Binary In this example, you will learn to write a JavaScript program that converts a decimal number to a binary number.   Example 1: Convert Decimal to Binary // program to convert decimal to binary function convertToBinary(x) { let bin = 0; …