JSFiddle - React, Tailwind, and code Playground
JavaScript
function testing(required, optional=getOptional()) {
console.log(required);
console.log(optional);
}
function getOptional(){
return 'dataFrom ' || 'defaultValue'
}
testing(true);
function testing(required, optional=getOptional()) {
console.log(required);
console.log(optional);
}
function getOptional(){
return 'dataFrom ' || 'defaultValue'
}
testing(true);