How es6 uses arrays and Boolean
Editor to share with you how es6 uses arrays and Boolean, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's learn about it!
Array and Boolean
Sometimes we need to filter the value of false in the array. For example, (0, undefined, null, false), you may not know this technique.
Var myArray = [1, 0, undefined, null, false]; myArray.filter (Boolean); > > [1] / / is it easy to pass in a Boolean function. These are all the contents of the article "how es6 uses arrays and Boolean". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!