Currently @ Bank of America
Blogging @ dsfaisal.com
Nullish Coalescing vs Logical OR
Nullish Coalescing vs Logical OR
The cn function combines two popular utilities:
1️⃣ clsx - For conditionally joining CSS class names
2️⃣ tailwind-merge - For merging Tailwind CSS classes intelligently, removing conflicts
The cn function combines two popular utilities:
1️⃣ clsx - For conditionally joining CSS class names
2️⃣ tailwind-merge - For merging Tailwind CSS classes intelligently, removing conflicts
Stop concatenating currency symbols! Use Intl.NumberFormat for proper formatting:
#javascript #webdev
Stop concatenating currency symbols! Use Intl.NumberFormat for proper formatting:
#javascript #webdev
Two ways to group by JavaScript with zero dependencies:
✅ using reduce()
✅ using Object.groupBy()
Two ways to group by JavaScript with zero dependencies:
✅ using reduce()
✅ using Object.groupBy()
map() is an array method in JavaScript that:
- Creates a new array
- Transforms each element of the original array
- Returns a new array of the same length
- Does NOT modify the original array
map() is an array method in JavaScript that:
- Creates a new array
- Transforms each element of the original array
- Returns a new array of the same length
- Does NOT modify the original array