Javascript

Count the occurrences of a value in an array

This function counts the number of times a specified value occurs in an array by filtering the array for the…

Convert an array of objects to a single object

This function converts an array of objects into a single object by using the Object.assign() method, which is used to…

Compare two arrays regardless of order

This function compares two arrays irrespective of their order. It sorts both arrays and converts them to strings for comparison.…

Typescript global window data

I often have to get some data from the global window object. And doing so in typescript will end up…