const propertyName = style[index];CSSStyleDeclaration: item() method / notebook
CSSStyleDeclaration: item() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const style = document.getElementById("div1").style;
const propertyName = style.item(1); // or style[1] - returns the second style listed