JSFiddle - React, Tailwind, and code Playground

by Neo Aptt

JavaScript

function is_empty(variable) {
  return variable === "" && typeof variable === "string";
}

function is_null(variable) {
  return variable === null;
}

function is_undefined(variable) {
  return variable === undefined && typeof variable === "undefined";
}

function is_false(variable) {
  return variable === false && typeof variable === "boolean";
}

function is_zero(variable) {
  return variable === 0 && typeof variable === "number";
}

function is_NaN(variable) {
  return !parseFloat(variable) && variable != 0 && typeof variable === "number";
}