#javascript
Read more stories on Hashnode
Articles with this tag
String to number conversion using the unary operator. const a = '10'; +a // will print number 10 Look at below const foo = { valueOf: () => '10'...
Readonly<Type> It will set all the properties of Type to read-only, which means the properties of the Type cannot be reassigned. Let's see with an...
The map is a collection of key-value pairs like Objects. But the main difference is map allows keys of any type(primitive/non-primitive). When we try...
function sortNumbers() { return arr.reduce((acc, value) => { const nextIndex = acc.findIndex(num => value > num); const index =...