How to empty an array in JavaScript ?

How to empty an array in JavaScript ?


Notice: A non well formed numeric value encountered in /home/content/p3pnexwpnas02_data01/82/41786482/html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/content/p3pnexwpnas02_data01/82/41786482/html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
Arrays are widely and commonly used in JavaScript. Especially if you are developing a dynamic app, there are very high chances that you might use Arrays in JavaScript. However, many a times I’ve noticed that people don’t use the Array related methods...
How to join or merge an Array in JavaScript?

How to join or merge an Array in JavaScript?


Notice: A non well formed numeric value encountered in /home/content/p3pnexwpnas02_data01/82/41786482/html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/content/p3pnexwpnas02_data01/82/41786482/html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
I’m sure you must have had a scenario where you had to join or merge two different Arrays. Well, let me tell you that its an easy task. JavaScript has a native method Array.concat()¬†which does it. Let’s take a look at the syntax....