You don't know Javascript
23 Followers
👩💻How does map.entries() work? The Map.entries() function returns a new iterator object that contains arrays of [key, value] for each element in the Map object in the order of their insertion. This method can be useful when you need to iterate over all elements of a Map object and perform some action with each key-value pair. Map.entries() returns an iterator, not an array, so to work with the result as an array, other methods should be used.
Optimizing SVG Files with SVGO SVGO (SVG Optimizer) is a Node.js library and command-line tool for optimizing SVG files. SVG files, especially those exported from vector editors, often contain a lot of unnecessary information: editor metadata, comments, hidden elements, default or non-optimal values, etc. All of this can be safely removed or transformed, which is what SVGO does. https://github.com/svg/svgo
What is a Symbol in JavaScript? 🟠 A Symbol is a special data type in JavaScript used to create unique identifiers for objects. They are often used to implement internal mechanisms of the language or to create private properties of an object. 🟠 Symbols are used in various situations. For example, they can be used to create unique keys in objects, which helps avoid naming conflicts. They can also be used to implement internal mechanisms of the language, such as iterators. 🟠 For instance, you can create "hidden" properties of objects, as shown in the second example in the photo, but due to the behavior of console.log() in Node.js, these data will still be displayed in the console. However, with regular data iteration (e.g., for...in or Object.keys()) and in browsers where console.log() by default does not output symbolic properties, these data will be "hidden".
A cool library has been released featuring free animated components created using React, Typescript, Tailwind CSS, and Framer Motion. https://github.com/magicuidesign/magicui?tab=readme-ov-file