JSFiddle - React, Tailwind, and code Playground

by slym12

JavaScript

let i = 0;
this.getName = function() {++i};
const scope = this;

const a = function(scope){
console.log(scope);
	 const getName = scope.getName();
  return getName;
}

console.log(a(scope))
console.log(i);