The truthy value is a value that is considered true when it’s in a boolean That’s mean each value also has an inherent boolean value, generally known as either truthy or falsy.
The following values are always falsy:
Everything else is truthy:
The virtual DOM is only a virtual representation of the DOM. Every time the state of our application changes, the virtual DOM updated instead of the real DOM. Virtual DOM is faster becuase when new elements are added to the UI, a virtual DOM is created a tree. Each element is…
The concat() method is both used in string and array. In String concat() method concatenates the two or more sperate string and return a new string. In array concat() method is same working like string concat() operation. Here concat() method is used to marge two or more arrays. And it behaviour also same as string concate(). Array concat() method is return a new array without changing existing arrays. The concat() method is resive one or more parameters for that is conneting the initial string or array.
The indexOf() method is both used in string and array. In String indexOf()…