How to increase website performance in 5 simple steps

𝟏. 𝐌𝐢𝐧𝐢𝐦𝐢𝐳𝐞 𝐇𝐓𝐓𝐏 𝐑𝐞𝐪𝐮𝐞𝐬𝐭𝐬 Websites are mainly slow because of too many (or too large) HTTP requests. We can eliminate unnecessary request by : (A) 𝗖𝗼𝗺𝗯𝗶𝗻𝗲𝗱 𝗳𝗶𝗹𝗲𝘀 : js to a file, css to a file (B) 𝗖𝗦𝗦 𝘀𝗽𝗿𝗶𝘁𝗲𝘀 : CSS Sprites are the preferred method for reducing the number of image requests.  (C) 𝗖𝗼𝗺𝗯𝗶𝗻𝗲…

Remove duplicates from an array of objects in JavaScript

Nice and clean if you only want to remove objects with a single duplicate value, not so clean for fully duplicated objects. export const uniqueArray = arr => { return Object.values( arr.reduce((acc, cur) => Object.assign(acc, { [cur.id]: cur }), {}), );}; https://stackoverflow.com/questions/2218999/remove-duplicates-from-an-array-of-objects-in-javascript