SOURCE

const style = {
  left: "100px",
  background: 'blue'
};

console.log(Object.entries(style).map(([k, v]) => `${k}:${v}`).join(';'))
console 命令行工具 X clear

                    
>
console