JSFiddle - React, Tailwind, and code Playground

by luka kupunia

HTML

<div id="demo"></div>

JavaScript

// Call method
var first = [23,12,13,5,3];

var sum = function(a){
	for ( i = 0; i < this.length; i++ ){
  	document.getElementById('demo').innerHTML += this[i] * a + '<br>';
  }
};

sum.call(first,0.1);

//
// forEach method
var second = [2,1,4,5];

second.forEach(function(x){
	console.log(x * 5);
});


//