<prompt> Refactor hii kipande cha code ili kuifanya ufanisi zaidi.fori0; i arr.length; i if arri 10 console.logarri;  <response>: Here is a refactored version of the code that uses the Array.prototype.forEach method to loop through the array and makes the code more concise and efficient:javascriptarr.forEachfunctionelement if element 10 console.logelement; ; 