The front end Js Pit records January 1, 2024 by Megan Norton No Comments 1. An empty array cannot be used as an if condition if([]) {console.log('123')}/ / '123' Copy the code Boolean() is called automatically to convert the conditional expression to a Boolean value: Boolean([]) //true