DevBitBytedevbitbyte.hashnode.dev·Dec 6, 2023How to write JavaScript indexOf and lastIndexOf array methods from scratchindexOf Returns first index of the found element otherwise -1. Array.prototype._indexOf = function(searchElement, fromIndex = 0) { for(let i = fromIndex; i < this.length; i++) { if(searchElement === this[i]) { return i ...Javascript Mini Challenges & ProjectsJavaScript