If you add two arrays together, it will convert them both to strings and concatenate them. For example, the result of adding arrays would be as below:
1 2 3 | console.log(['a'] + ['b']); // "ab" console.log([] + []); // "" console.log(![] + []); // "false", because ![] returns false. |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.