how to use javascript array filter method?

In this article, let’s discuss the usage of the javascript array filter method. The filter() method creates a new array with all elements that pass the test implemented by the defined function. Array filter method does not execute the function for the empty array and also it doesn’t make any changes to the original array as well. … Read more

How to use javascript reduce method?

In this article, let’s discuss the syntax and usage of the javascript reduce method. The reduce() method executes a reducer function (user-defined) on each member (from left-to-right) of the array resulting in single output value. The accumulator stores the return value of the function. Javascript reduce method does not execute on an array without any elements. Syntax accumulator – … Read more

How to use javascript switch statements?

In this article, lets discuss the usage of the javascript switch statements. Javascript swtich statement is a part of Conditional statements which is used to execute different statements based on different conditions. This is also a better alternative for nested IF/Else statement. Javascript switch statement evaluates an expression and the value of the evaluation is … Read more

How to use javascript try catch and finally statements?

In this article, let’s discuss the usage of the javascript try catch and finally statements. In any computer program, different errors can occur. So its always a good practice to use the correct exception handling techniques while programming. Javascript try catch and finally, statements can be used for this exception handling. Try block can be … Read more

How to use Javascript multiline string ?

In this article, we have discussed the usage of the javascript multiline string using the template literals. Template literals are string literals enclosed by the backticks(“), allowing multiline strings and embedded expressions. You can also use string interpolation features with them.  These literals can also hold placeholders which are denoted by $ symbol and curly … Read more