JSFiddle - React, Tailwind, and code Playground
by Kyle Pennell
HTML
<script src="https://getfirebug.com/firebug-lite-debug.js"></script>
<!-- disregard this pane, html is shown in the "result" pane -->
<h4><strong>← Code Example from <a href="http://www.javascriptenlightenment.com/" target="_blank">JavaScript Enlightenment Book</a> by <a href="http://www.codylindley.com" target="_blank">Cody Lindley</a></strong></h4>
<p>JavaScript code is executed on page load. Click the "Run" button in the top bar to re-run the JavaScript code. Output is logged to the <a href="http://getfirebug.com/firebuglite" target="_blank">Firebug Lite</a> console below ↓.</p>
JavaScript
// string, number, and boolean objects
console.log(typeof new String('foo')); // logs 'object'
console.log(typeof new Number(1)); // logs 'object'
console.log(typeof new Boolean(true)); // logs 'object'
// string, number, and boolean literals/primitives
console.log(typeof 'foo'); // logs 'string'
console.log(typeof 1); // logs 'number'
console.log(typeof true); // logs 'boolean'