-
1️⃣ What is the difference between var, let, and const?
varis the old way to declare variables and its function is scoped It can be redeclared and updated anywhere in its scope can leads to bugs.letandconstare modern and block-scoped we Useletfor values that will change andconstfor values that wont change -
2️⃣ What is the spread operator (...)?
a handy tool written as three dots (...) that allows get the contents of an array or object into another perfect for making quick copies or merging data without changing the original source -
3️⃣ What is the difference between map(), filter(), and forEach()?
forEach()simply loops through an array to perform an action but doesn't return anything OTOHmap()transforms every item and make brand-new array of the same length. OTOHfilter()checks each item against a condition and make array containing only the items that passed -
4️⃣ What is an arrow function?
Arrow functions are a shorter and cleaner way to write functions using the=>syntax. They are anonymous and don't have their ownthiscontext making them very useful for callbacks and keeping our code readable -
5️⃣ What are template literals?
Template literals use backticks (`) instead of quotes. They make it incredibly easy to embed variables directly into strings using${variable}and let us write multi-line text without needing messy escape characters
- GitHub Repository Link: Ahadunnobi / Github-Issue-Tracker
- Live Site Link: GitHub Issue Tracker Live
- LinkedIn Profile: Ahadunnobi