JSFiddle - React, Tailwind, and code Playground

by dima_k

JavaScript

function add(a,b){
    if(!a && !b){
        console.log('You must you must to provide at least one vealue');
        return;
    }
    if(!b){
        console.log(a);
        return;
    }
    console.log(a+b);
}

add(1,3);
add(2);
add();