JSFiddle - React, Tailwind, and code Playground

by justinwyllie

JavaScript

//use strict test
//see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/Strict_mode
function test() {
"use strict";
    
//these all break    
//t = "a";  

//var obj1 = {};
//Object.defineProperty(obj1, "x", { value: 42, writable: false });
//obj1.x = 9; // throws a TypeError
    
//var o = { p: 1, p: 2 }; // !!! syntax error

//+ no with    
    
alert("hello"); 
    
    
    
    
}

test();