JSFiddle - React, Tailwind, and code Playground

by helgatheviking

JavaScript

let test = '';

let num = parseInt(test) || 0;

console.debug(num);
if (num) {
  console.debug('truthy');
} else {
  console.debug('falsey');
}