Hey! In this tutorial, I will teach you JavaScript Basics!
First, please note:
In JavaScript, we start variables with [CODE lang="javascript" title="Example" highlight="1"]var[/CODE]!
So, let's make a quick cup system with example!
[CODE lang="javascript" title="Tutorial"]var Cup = true;
var isDrinking = false;
var disabled = false;
// Let me explain. We create our first variable and name it cup, by true that means
// with example our cup exist. IsDrinking well the name say it, and Disabled for is the
// system disabled?
isDrinking = true;
console.log("We are now drinking!")
disabled = true;
console.log("Disabled cause we are drinking!")
var cupEmpty = true;
console.log("The cup has been drinked fully!")
// Alright, so we have now set our isDrinking to true since we drink. After a minute
//, we disable it since we drinked it. Then we create a new variable saying our cup is
// empty! console.log is just for debugging.[/CODE]
Alright; Comment if this helped!
First, please note:
In JavaScript, we start variables with [CODE lang="javascript" title="Example" highlight="1"]var[/CODE]!
So, let's make a quick cup system with example!
[CODE lang="javascript" title="Tutorial"]var Cup = true;
var isDrinking = false;
var disabled = false;
// Let me explain. We create our first variable and name it cup, by true that means
// with example our cup exist. IsDrinking well the name say it, and Disabled for is the
// system disabled?
isDrinking = true;
console.log("We are now drinking!")
disabled = true;
console.log("Disabled cause we are drinking!")
var cupEmpty = true;
console.log("The cup has been drinked fully!")
// Alright, so we have now set our isDrinking to true since we drink. After a minute
//, we disable it since we drinked it. Then we create a new variable saying our cup is
// empty! console.log is just for debugging.[/CODE]
Alright; Comment if this helped!