JSFiddle - React, Tailwind, and code Playground

by Scott Kaye

HTML

<input type="checkbox" value="true">

JavaScript

console.clear();

var val = $("input").val();
console.log(typeof val, val);

var prop = $("input").prop("value");
console.log(typeof prop, prop);

var converted = JSON.parse(val);
console.log(typeof converted, converted);

var safe = val === "true";
console.log(typeof safe, safe);