Niweera
5/26/2019 - 1:02 PM

JS for loop

// JS for loop

const nemoArray = ['nemo'];

function findingNemo(array){
  for (let i = 0; i < array.length; i++){
    if (array[i] === "nemo"){
      console.log("Nemo Found!")
    }
  }
}

findingNemo(nemoArray);