# **Javascript tutorial note** **Variable** is a temporary container to store data into the computer memory for further computation. ``` <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="./css//style.css"/> </head> <body> <p>Plus Answer: <span id="plus"></span></p> <p>Minus Answer: <span id="minus"></span></p> <button>Click me</button> <script> const plusAnswer = 2 + 5 const minusAnswer = 25 - 6 document.getElementById('plus').innerHTML = plusAnswer document.getElementById('minus').innerHTML = minusAnswer </script> </body> </html> ``` **Conditions** This is a way for the computer to tke decisions based on the truthfulness and falsefullness of an event. For example, when the given password is a correct, the computer should log the user in. ``` const age = 710 if(age == 17){ document.getElementById("desc").innerHTML = "Come back next year" }else if(age < 17){ document.getElementById("desc").innerHTML = "Sorry, you are too young to drive" }else if(age >= 70){ document.getElementById("desc").innerHTML = "Sorry, you are too old to drive" }else{ document.getElementById("desc").innerHTML = "Congratulations, you can drive" } ```