JSFiddle - React, Tailwind, and code Playground
JavaScript
function func1(obj) {
obj.a = 5;
obj.b = 6;
}
function main() {
var vars = {
a: null,
b: null,
c: null
};
with(vars) {
a = 'test';
c = 222;
console.log(vars);
func1(vars);
console.log(vars);
}
}
main();