JS Coding Questions Logo
JS Coding Questions
#359💼 Interview💻 Code

What happens with negating an array

Advertisement

728x90

Negating an array with ! character will coerce the array into a boolean. Since Arrays are considered to be truthy So negating it will return false.

javascript
1console.log(![]); // false

Advertisement

Responsive Ad
🎯 Practice NowRelated Challenge

JavaScript Coding Exercise 16

Test your knowledge with this interactive coding challenge.

Start Coding

Advertisement

728x90
359of476