JSFiddle - React, Tailwind, and code Playground

by gcjnst

JavaScript

var obj = '{}';
var x = typeof obj === 'string' ? 1 : 2;
alert(x);