Try to avoid loops in JavaScript for better performance

Use objects instead of arrays A benefit of objects is that you can directly call its children elements (properties) by name. While arrays only have index numbers. Here is a simple example: const exampleDataArray = [ { id: 8462943, name: “Google”, url: “http://google.com” }, { id: 9847323, name: “Amazon”, url: “http://amazon.com” }, { id: 938442934,… Continue reading Try to avoid loops in JavaScript for better performance