Why do we write const for arrays and objects ?
We use const for arrays and objects to prevent reassigning the variable to something else. It means you can change the contents (like add/remove items in array or update object properties), but you cannot assign a new array or object to that variable. This helps avoid mistakes in code.
Revision of Yesterday
Create an array of 6 books. Each book should have:
id (number)title (string)author (string)pages (number)isAvailable (boolean)Print the titles of all books by a particular author you like.
Create an array of 5 movies with:
idtitledirectorreleaseYear