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