๐๐ฎ๐๐ฎ๐ฆ๐ฐ๐ฟ๐ถ๐ฝ๐ ๐ช๐ฒ๐ฒ๐ธ ๐ญ ๐ ๐ผ๐ฐ๐ธ ๐ค๐๐ฒ๐๐๐ถ๐ผ๐ป๐
Prepare for your JavaScript interviews. Here are key concepts you need to know.
CSS Hiding
- display none removes the element. It takes no space.
- visibility hidden hides the element. It keeps its space.
CSS Units
- px is a fixed size.
- % is relative to the parent.
- em is relative to the parent font size.
- rem is relative to the root font size.
Optional Chaining
- Use ?. to read nested properties.
- It stops your app from crashing.
- It returns undefined if the property is missing.
Bitwise Operators
- These work on binary numbers.
- Use & for AND.
- Use | for OR.
- Use ^ for XOR.
- Use ~ for NOT.
Type Casting
- Implicit conversion happens automatically.
- Explicit conversion happens when you use functions like Number().
Truthy and Falsy
- JavaScript has 8 falsy values.
- These are false, 0, empty strings, null, undefined, and NaN.
- Everything else is truthy.
Variable Declarations
- var is function scoped.
- let is block scoped.
- const is block scoped. Its value stays the same.
Mutable and Immutable
- Mutable objects change after creation. Examples are Arrays and Objects.
- Immutable values stay the same. Examples are Strings and Numbers.
Source: https://dev.to/dev_saravanan_journey/javascript-week-1-mock-questions-with-answers-3l9g