Edit This Code:
<!DOCTYPE html>
<html>
<body>

<p id="myP" style="text-decoration:line-through;">This is an example paragraph.</p>

<button type="button" onclick="myFunction()">Return text decoration of p</button>

<script>
function myFunction() {
    alert(document.getElementById("myP").style.textDecoration);
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy