InterviewHubPRO
Section Overview
Q364

Question 364 of 521

Part 6: Async Internals, Memory, Microtasks & Web APIs (329 - 403)

70%
JavaScript Internals (521 Qs)•Part 6: Async Internals, Memory, Microtasks & Web APIs (329 - 403)

What happens if we add two arrays

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,

javascript
  console.log(["a"] + ["b"]); // "ab"
  console.log([] + []); // ""
  console.log(![] + []); // "false", because ![] returns false.