Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Tutorial JavaScript Tutorial | 1 | Variables and console.log

MinTag

Coder
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!
 

New Threads

Buy us a coffee!

Back
Top Bottom