to get a property value of an element in js :
html:
<div class="element" style="color: red;">Red hot chili pepper!</div>
js:
const your_element = document.querySelector('.element')
const color_of_my_element = your_element.style.color
console.log(color_of_my_element) // red