javascript add inline style css var

CSS
element.style.setProperty("--my-var", jsVar + 4);
Source

Also in CSS: