JSFiddle - React, Tailwind, and code Playground

by ksoncan34

JavaScript

const language = {
  set current(name) {
    this.log.push(name);
    this._current = name;
  },
  get current() {
  	return this._current;
  },
  log: []
}

language.current = 'foo';
language.current = 'bar';
console.log('current: ' + language.current);
console.log('log: ' + language.log);