JSFiddle - React, Tailwind, and code Playground

by kentaromiura

JavaScript

function isArgument(item){
    var result = !!~Object.prototype.toString.call(item).indexOf('Arguments');
    if(!result){
        result = true;
        for(var key in item){
            result = false; break;
        }    
    }
    return result;
}
    
    (function(){
        alert(isArgument(arguments))
        alert(isArgument({length:3,'0':'','1':'','2':''}))        
    })(1,2,3)