JSFiddle - React, Tailwind, and code Playground
JavaScript
function FormatGrid(ID, Format) {
if (typeof Format != 'string') {
for (var item in Format) {
if (!Format.hasOwnProperty(item)) {
continue;
}
this[item] = Format[item];
}
}
console.log(HeaderFont, HeaderLinkFont);
// Here you could then access `options.HeaderFont`.
}
FormatGrid(5, {
HeaderFont: 'blue',
HeaderLinkFont: 'red'
})
console.log(typeof HeaderFont);