fork download
  1. // Juan David Alfaro García
  2. // 2A
  3.  
  4. let d=[7,1,3,5,9];
  5. let n=d[0];
  6. for (let i = 1 ; i < d.length ; i++)
  7. if (n===d[i])
  8. {
  9. console.log(i,d[i])
  10. break
  11. }
Success #stdin #stdout 0.03s 16648KB
stdin
Standard input is empty
stdout
Standard output is empty