Explore our extensive collection of courses designed to help you master various subjects and skills. Whether you're a beginner or an advanced learner, there's something here for everyone.
For all the self-taught geeks out there, here is our content library with most of the learning materials we have produced throughout the years.
It makes sense to start learning by reading and watching videos about fundamentals and how things work.
Full-Stack Software Developer - 16w
Data Science and Machine Learning - 16 wks
Search from all Lessons
Curated list of small interactive and incremental exercises you can take to get better at any coding skill.
Curated section of projects to build while learning with simple instructions, videos, solutions, and more.
Guides on different topics related to the technologies that we teach in our courses
Every week, we pick a real-life project to build your portfolio and get ready for a job. All projects are built with ChatGPT as co-pilot!Start the Challenge
A tech-culture podcast where you learn to fight the enemies that blocks your way to become a successful professional in tech.Listen the podcast
The best way to check if an array is empty is by accessing the length property of the array.
In this example, we first verify that the array is of type array with the expression
Array.isArray(n), because if it was another type of data, for example, an object we couldn't access the length property, then we verify that the array is empty with the expression
n.length === 0.
In this example, we assigned a new empty array
 to the n array, removing all its elements.
It is important to have in mind that if you use the const keyword to create the array, this syntax won't work for emptying an array because the constants can't be modified as in the array example m.
The splice method allows you to remove the elements of an array from a specific index, this method receives 2 numeric parameters, the first is the index from which you want to start removing elements, the second parameter is the number of elements you want to remove.
Finally, another option to empty an array is by using the
while() loop removes all the elements of the array one by one.