JSFiddle - React, Tailwind, and code Playground

by webinista

HTML

<div id="result"></div>

JavaScript

var arrNum = [1,2,3,4,5],
    callIt = function(){
        var r = document.getElementById('result'),
            br = document.createElement('br'),
            txt = document.createTextNode(this); 
        r.appendChild(txt);
        r.appendChild(br);        
    }
    
arrNum.map( callIt ); // without thisArgument
arrNum.map( callIt, arrNum ); // with thisArgument