🛢 New JavaScript Set methods
🔸intersection() returns a new set with elements in both this set and the given set.
🔸union() returns a new set with all elements in this set and the given set.
🔸difference() returns a new set with elements in this set but not in the given set.
🔸symmetricDifference() returns a new set with elements in either set, but not in both.
🔸isSubsetOf() returns a boolean indicating if all elements of a set are in a specific set.
🔸isSupersetOf() returns a boolean indicating if all elements of a set are in a specific set.
🔸isDisjointFrom() returns a boolean indicating if this set has no elements in common with a specific set.
🔸intersection() returns a new set with elements in both this set and the given set.
🔸union() returns a new set with all elements in this set and the given set.
🔸difference() returns a new set with elements in this set but not in the given set.
🔸symmetricDifference() returns a new set with elements in either set, but not in both.
🔸isSubsetOf() returns a boolean indicating if all elements of a set are in a specific set.
🔸isSupersetOf() returns a boolean indicating if all elements of a set are in a specific set.
🔸isDisjointFrom() returns a boolean indicating if this set has no elements in common with a specific set.
❤9🔥5👍2
ES13 CheatSheet - 6 Modern JS Features (w/ examples)
❤5👍5🔥2
🥷 How to Validate Forms in React and React Native Using Yup and Formik
Validation is a key part of development, regardless of what programming language you’re writing. Developers should always be validating user input, API parameters, and retrieved values.
One of the most common elements where you’ll need to apply user input validation is via a form. This could be a user sign up form, a contact us form, or a simple questionnaire....
Validation is a key part of development, regardless of what programming language you’re writing. Developers should always be validating user input, API parameters, and retrieved values.
One of the most common elements where you’ll need to apply user input validation is via a form. This could be a user sign up form, a contact us form, or a simple questionnaire....
👍6❤5
⛑ CSS Flexbox Layout Guide
Our comprehensive guide to CSS flexbox layout. This complete guide explains everything about flexbox, focusing on all the different possible properties for the parent element (the flex container) and the child elements (the flex items). It also includes history, demos, patterns, and a browser support chart.
Our comprehensive guide to CSS flexbox layout. This complete guide explains everything about flexbox, focusing on all the different possible properties for the parent element (the flex container) and the child elements (the flex items). It also includes history, demos, patterns, and a browser support chart.
❤6👍6🔥1
📝 How does map.entries() work?
The Map.entries() function returns a new iterator that contains [key, value] arrays for each pair of elements in the map object, in the order they were added to the object.
This method can be useful when you want to iterate over all the elements of a Map object and perform some action on each pair.
Map.entries() returns an iterator, not an array, for an array in the end, you should use other methods
The Map.entries() function returns a new iterator that contains [key, value] arrays for each pair of elements in the map object, in the order they were added to the object.
This method can be useful when you want to iterate over all the elements of a Map object and perform some action on each pair.
Map.entries() returns an iterator, not an array, for an array in the end, you should use other methods
👍5❤3
🖥 How does Object.create() work?
The Object.create method creates a new object with the specified prototype and properties.
It takes two arguments: the first is an object that will be the prototype for the new object.
The second is an optional object containing the properties and their descriptors that will be added to the new object.
If the first argument is not passed or is null, the new object will be created with Object.prototype as the prototype.
The Object.create method creates a new object with the specified prototype and properties.
It takes two arguments: the first is an object that will be the prototype for the new object.
The second is an optional object containing the properties and their descriptors that will be added to the new object.
If the first argument is not passed or is null, the new object will be created with Object.prototype as the prototype.
👍8❤2🔥1