how to make js function important like css code example
Example 1: js set important style
function myFunction() {
var x = document.querySelectorAll("#testDiv p.example");
x[0].style.setProperty("background-color", "red", "important");
}
Example 2: how to make a property important in javascript
element.style.setProperty("display", "inline", "important")