JSFiddle - React, Tailwind, and code Playground

by Givi Kesanashvili

JavaScript

function bar(a, b) {
    if (arguments.length === 2) { 
        var isInts = [].every.call(arguments, function(val) {
            return !isNaN(val);
        });
        if (isInts) {
            console.log(a + b);
        }
    } else if (arguments.length > 2) {
        console.dir([].join.call(arguments, ""));
    }
}

bar(2, 5);

bar("Hello", ", ", "world", "!");