How to get CSS property in JavaScript

DOM
By Jad Joubran · 
Last updated Jul 29, 2018
#box {
  padding: 15px;
}
<div id="box"></div>
const div = document.querySelector("#box");

const padding = getComputedStyle(div).padding;
15px