JSFiddle - React, Tailwind, and code Playground
JavaScript
console.log(this === window); // true
var Weather = function () {
var unit = 'metric';
this.city = 'Salem';
this.getCity = function () {
console.log(this.city);
};
};
var report = new Weather();
console.log(report.city);
report.getCity();
report.getCity.call({city : 'Portland'});