JSFiddle - React, Tailwind, and code Playground

by Abhisek DasGupta

JavaScript

let arr = [1, 2, 4, 6, 3, 7, 8]
let l = arr.length;
let mn;

for(let i = arr[0]; i < l; i++){

	if(arr[i] !== i)
		mn = arr[i];
}

console.log(mn);