Welcome aboard! We are happy you are here and wish you good net-raft!
<button onclick="function1()">Try it</button>
<div id="div1"></div> 
<script>
function function1() { 
var number = 20; 
if (number < 30) {
result = "the number is less than 30." ;
} else {
result = "the number is greater than 30." ;
}
document.getElementById("div1").innerHTML = result;
}
</script> 
The most helpful JAVASCRIPT solutions