This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { initializeApp } from 'firebase/app'; | |
| import { getFirestore, collection, doc, getDoc, query, where, updateDoc, onSnapshot } from 'firebase/firestore'; | |
| // Firebase configuration | |
| const firebaseConfig = { | |
| // Your Firebase configuration here | |
| }; | |
| // Initialize Firebase app | |
| const app = initializeApp(firebaseConfig); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Most Used Array methods made fropm reduce() | |
| const emojis = [ | |
| 'โ', | |
| '๐', | |
| '๐', | |
| 'โ', | |
| '๐', | |
| '๐ฑ', | |
| '๐', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const letters = ['a','b',"A",'a','b','c'] | |
| const sum = letters.reduce((acc,char)=>{ | |
| // Check the property, if exist sum one , if not create with value 1. | |
| acc[char] = acc[char] + 1 || 1 | |
| return acc | |
| },{}) | |
| console.log(sum) // {a: 2, b: 2, A: 1, c: 1} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .parent { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); | |
| grid-gap : 1em; | |
| } | |
| .children { | |
| background-color : green; | |
| width : 200px; | |
| height : 200px; |