JSFiddle - React, Tailwind, and code Playground

by m_gol

HTML

<script src="https://getfirebug.com/firebug-lite-debug.js"></script>

JavaScript

(function ( undefined ) {
	console.log( '0: ' + undefined );
})( 0 ); // => 0

(function ( undefined ) {
	'use strict';
	console.log( '1: ' + undefined );
})( 1 ); // => 1

(function () {
	undefined = 2;
	console.log( '2: ' + undefined );
})(); // => 2

(function () {
	'use strict';
	try {
		undefined = 3;
		console.log( '3: ' + undefined );
	} catch (e) {
		console.log( '3: ' + e );
	}
})(); // => TypeError

(function () {
	var undefined = 4;
	console.log( '4: ' + undefined );
})(); // => 4

(function () {
	'use strict';
	var undefined = 5;
	console.log( '5: ' + undefined );
})(); // => 5

var undefined = 6;
(function () {
	console.log( '6: ' + undefined );
})(); // => undefined

var undefined = 7;
(function () {
	'use strict';
	console.log( '7: ' + undefined );
})(); // => undefined