JSFiddle - React, Tailwind, and code Playground

JavaScript

var myarray = [1,2];  
 myarray.forEach( k => {
    console.log(k)
 });