JSFiddle - React, Tailwind, and code Playground
by adouga
JavaScript
'use strict';
// Object literal extensions
var val1 = 2, val2 = 3;
var objLit = {
val1: 10,
val2: 20,
calc() {
return this.val1 * this.val2
}
};
console.log(val1 + ' ' + val2);
console.log(objLit);
console.log(objLit.calc());