JSFiddle - React, Tailwind, and code Playground

by ppgab

JavaScript

function outsideScope() {
  const outer = 'outer';
  return function inside() {
    console.log(outer);
  }
}
function insideScope() {
  return function inside() {
    console.log('outer');
  }
}