It's common to need to add properties to an object or array in javaScript but only if the property is truthy, meaning it has a value. You could do this with a bunch of if statements, but in this video, you will learn how to use the logical and operator (&&) to conditionally add properties to an object or array.
📚 Concepts & technologies covered
JavaScript
Objects
Arrays
🌎 Follow me here:
Discord: / discord
Twitter: / tomdoes_tech
Facebook: / tomdoestech
Instagram: / tomdoestech
TikTok: / tomdoes_tech
☕ Buy me a coffee: https://www.buymeacoffee.com/tomn
On this page of the site you can watch the video online Conditionally Add to Objects & Arrays in JavaScript with a duration of hours minute second in good quality, which was uploaded by the user TomDoesTech 22 June 2021, share the link with friends and acquaintances, this video has already been watched 3,356 times on youtube and it was liked by 88 viewers. Enjoy your viewing!