JavaScript Comments

JavaScript comments are used to deliver messages. It is used to add information about the code, warnings, or suggestions so that end-user can easily interpret the code. Comments are annotations in the source code of a program that are ignored by the interpreter, and therefore have no effect on the actual output of the code. Comments … Read more

JavaScript Let

The let keyword is used for variables declaration in JavaScript with block scope. The variables defined with JavaScript let word cannot be redeclared. We accidentally cannot do this. The syntax for the let keyword is given below: JavaScript Let – Global Scope The variables that we declared in the main body or outside the function … Read more

JavaScript Arrays

JavaScript Arrays are list-like objects whose prototype has methods to perform traversal and mutation operations. Neither the length of the JavaScript arrays nor the types of its elements are fixed. Since an array’s length can change at any time, and data can be stored at non-contiguous locations in the array, JavaScript arrays are not guaranteed … Read more

JavaScript Assignment

The JavaScript assignment operators are used to assign the right-side operand values to variables. The = sign is used for assigning a value to a variable. For example, we can perform the increment using the JavaScript assignment operator in the following way: JavaScript Assignment – Operators Following are some assignment operators used in JavaScript: Operator … Read more

JavaScript String

JavaScript String is a series of zero or more characters, represented by using single or double-quotes. There are two ways to create a string: Escape Sequence As strings are written in double or single quotes so if there is a need to show your strings in double/single quotes as output use backslash \’ \” with … Read more

JavaScript Number Methods

The JavaScript number methods help to work on numbers. JavaScript number methods and properties help to work with primitive values. In JavaScript, numbers are implemented in double-precision 64-bit binary format IEEE 754. Numbers are only one type, represent numbers with or without decimals. Following are some JavaScript number methods that are used to work with numbers … Read more

JavaScript Numbers

In JavaScript, numbers are implemented in double-precision 64-bit binary format IEEE 754. Numbers are only one type, represent numbers with or without decimals. JavaScript Numbers Exponentiation The very large and very small JavaScript numbers can be written with exponent (e). Output: JavaScript Numbers Format Just like other programming languages, JavaScript does not define different types like … Read more

JavaScript Array Iteration

JavaScript Array iteration methods operate on every array item. Following are some methods that are used for array iteration: Array.filter() method The filter() the method is used to create a new array with array elements based on condition. This example creates a new array from elements with a value larger than 20: Output: In the example above, … Read more

JavaScript Math

JavaScript Math is a built-in object that has properties and methods for mathematical constants and functions. It’s not a function object. The math works with the Number type. It doesn’t work with BigInt. Output: Javascript Math- concept In Javascript math ,Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic … Read more

JavaScript Set Date Method

The JavaScript Date() object helps when working with dates. To create a new object the with current date and time, add the object to your script. The JavaScript Set Date Methods are used to set date values (years, months, days, hours, minutes, seconds, milliseconds) for a Date Object. Following are some methods mentioned: JavaScript setDate() method can be used … Read more