JSFiddle - React, Tailwind, and code Playground

by juristr

JavaScript

/*
    From: http://pierrespring.com/2010/05/11/function-scope-and-lexical-scoping/
*/

var text = 'Look at me';

var parent_function = function () {

  var inner_function = function () {
    var scream = '!!!';
    alert(text + ', ' + reason + scream);
  }
  
  var reason = "I'm an attention whore";
  var scream = '!';
  
  alert(text + scream);
  inner_function();
};

parent_function();