JSFiddle - React, Tailwind, and code Playground
by fristyr
JavaScript
function makeNegative(num) {
if (num > 0) {
} else {
return "-" + num;
}
}
console.log(makeNegative(25))
by fristyr
function makeNegative(num) {
if (num > 0) {
} else {
return "-" + num;
}
}
console.log(makeNegative(25))