JSFiddle - React, Tailwind, and code Playground

by aninaslyan

JavaScript

let k = function even() {
	let arr = [];
  for(let i = 0; i<= 100; i++) {
			arr.push(i);
  }
  return arr;
}

console.log(k(), "bla");

let odds  = k().map(function (v) { return v + 1; });
let pairs = k().map(function (v) { return { even: v, odd: v + 1 }; });

console.log(odds, pairs);
let fives = [];
k().forEach(function (v) {
   if (v % 5 === 0){
       console.log(fives.push(v));
       return fives.push(v);
   }
});