Skip to content
Sign upLog in
← Back to Community

πŸŽ‡Node JS Crash Course πŸŽ‡ [1000 Lines]

Profile icon

JavaScript Tutorial

Welcome to this complete JavaScript tutorial, enough to get you kickstarted into learning the complete JavaScript language.

Course Content:

  • What is JavaScript?
  • Where does JavaScript code run?
  • Running JavaScript code on Google.
  • Running JavaScript code on an editor.
  • Installing Node.JS
  • Actual coding:
    • Comments.
    • Variables.
      • What are variables?
      • Variables in JavaScript
      • Strings.
        • Escaping string literals
    • Arithmetic Operations
      • Addition
      • Subtraction
      • Division
      • Multiplication
      • Remainder
      • Incrementing
      • Floats
      • Augmented Operations
    • String Manipulation
      • Using single quotes
      • Escape Sequences
      • String Manipulation
      • Finding items in a string.
    • Exercise 1
    • User Input
    • Converting Data types.
    • Arrays
      • Single Arrays
        • Accessing Array Data
      • Nested Arrays.
        • Acessing Nested Array Data
      • List manipulation.
        • .push()
        • .shift()
        • .unshift()
        • .pop()
    • Object literals
      • Accessing Object Data
    • Functions
      • Parameters and Arguments.
      • Global vs Local
    • Boolean values.
    • typeof to get data type.
    • If statements.
      • If statements' operators.
      • and and or
      • Else statements
      • Else if statements
    • While loops.
    • Switch Statements

What is JavaScript?

__JavaScript (often shortened to JS) is a lightweight, interpreted, object-oriented language with first-class functions. JS, was introduced by Brendan Eich in 1995, and since has grown to be one of the most popular programming languages for large companies like FAANG(Big Tech) on an average salary of $70,000 in the U.S. With JS, you can become either a Front-End-Developer, a Backend-Developer, and even a Full-Stack-Developer. 97% of the websites uses JS to interact with their pages. YEAH let that sink in __.

So, why not start learning it already when it is extremely easy to use and write the language?

Where does JavaScript code run?

JavaScript was initially designed to only run on browsers. On Mozilla, the JS Engine was called SpyderMonkey and on Google, it was called V8. Up until 2009, this was the case, when an extremely clever engineer called Ryan Dhal took the open-source JS Engine in Chrome and embedded it into a C++ program. He called it Node. Soo, basically, Node is a C++ program that allows us to run JS outside of Google.

Hope, I haven't bored you yet. DW, the interesting part is starting lol.

Running JavaScript code on Google

Now, I am going to show you how we can run JS on Google, like I said, using the JS Engine inside Chrome. So..

  • __Go to Chrome and right-click the main screen. __
  • Hit inspect
  • Go to the console tab.

I assume everyone knows how to do this so I will not add pictures.

To test if your console is working, type in console.log('Hello, World!');. This is a little "Hello, World!" program in JS. Use it to test the console. You should see an output displaying: Hello, World! right under your line of code.

** Note: It doesn't matter if you put the semi-colon or not, but it is best practice to put one. **

Running JavaScript code on an editor

Now you can't just use google to run all your JS, beacause there is no way to properly save the code you write. For actual code compiling, debugging and plugins, we need a Code-Editor. There are amazing editors out there that you can download. Or you can just use the amazing Replit IDE you are already on. Nevertheless, here are a few editors you can download:

Installing Node.JS

I would also recommend downloading Node as it is very useful and comes in handy when downloading "third-party-libraries" which are very helpful when developing apps and games using JS. For this tutorial though, I will be using Replit as it is the fastest, easiest and the best way to write Code efficently and quickly. So, if you haven't already, go make a Node.js Repl on your replit. Or click here to make one.

NOW!!! Let's get started with actually JavaScript learning and forget the boring stuff.

Actual Coding:

Lets get started with learning JS:


I just wanted to add a little note about comments in JS. Comments in programming generally are a bunch of lines that are there to add context to code. They are not interpreted as code, rather they are ignored and are just there so that other programmars can see those comments and understand what is happening in the code. Comments in JavaScript are defined using two slashes, //. Here is an example:

// This is a comment and will not be interpreted as code. console.log("The comment is not code. YAYYY!!!");


What are variables?

Variables, the most important concept in JS and in any programming language, are used to store data temporarily in the computer's memory. So variable is we storing our data somewhere and allocating it with a name. With this, we can read the data at the given location using the variable name later on and modify it the way we want. Think of variables like algebra. We assign a value to a variable like: x = 5. In this case, x is the variable. Here is a little metaphor to understand variables.:

_Let's say we have a few boxes. Each box contains things like stationery, books, devices, etc. Then to remember what box contains what, we put a label on each of the boxes, with keywords. "Stationery", "Books" "Devices". This way, we remember what thing is in what container. Variables are the same exact thing, but in programming. In programming, the variables' name would be the labels, the value in the variable would be the box contents, and the memory allocated into the computer, would be the box itself. _

Variables in JavaScript.

Up until the release of ES6, the standardized version of JavaScript, the practice of defining a variable in JavaScript was using the var keyword. But after its official release, defining a variable is best using let. There is a slight difference between these two keywords. The difference is the scope of the variable. The var keyowrd provides a global scope, meaning that it can be used in the entire function block. Where is let, is used in the enclosing function block, meaning it can only be used in the function itself. For more info on this, read this SO page that explicitly explains the differences between these two ways of defining variables.

Now, after we have written let, we can give a name or an identifier to our variable. This is the variable name. We can call it whatever we want as long as it meets the rules of defining a variable. There are a few ways you can define a variable. Here are the common conventions:

// Using only the variable name without any space. let name; // Using two words separated by an underscore. let my_name; // Using two words using camelCase(First letter capital of each word except first.) let myName; // Using a word and a number without any space. let name1

And these are rules that should be followed:

// Cannot be a reserved keyword. These are keywords that are in JS like, let, var, if, etc. // Should be meaningful, not just letters like a, b, x, etc. // Cannot start with a number. // Cannot contain space.

Now, if we use console.log(name); to actually print out the value associated with the name variable, we will see in the output, that it is undefined:


This is because there is no value given to the variable. To actually give a value to a variable, we have to use an = sign:

// Giving the variable a value let name = "John"; console.log(name);

Now, because the variable name is set to a string, "John", the name's value is John. So when we print out the value of name, we will get the output as John:


BTW, the "John", the value set to name is called a string. A string is a sequence of characters. You can set it to anything you like and it will be printed out. A string can be either double quote, "<string>" or single quote, '<string>' . It evaluates as the same thing.

Arithmetic Operations.

There are four main operations we learned in math:

  • addition : +
  • subtraction : -
  • multiplication : Γ—
  • division : Γ·

These are the normal symbols we use. But in programming, there is a slight difference. Division and Multiplication symbols are differenct and there are a few more operations. Here are the examples with the outputs:

  • Addition:

    let addition = 3+2;

    ##### Output:`5`
  • Subtraction:

    let subtraction = 3-2;

    ##### Output: `1`
  • Multiplication:

    • The symbol for multiplication in JS is *

    let multiplication = 3*2;

    ##### Output: `6`
  • Division:

    • The symbol for division in JS is /

    let division = 4/2;

    ##### Output: `2`
  • Finding only the remainder of a an improper division:

    • We can find only the remainder of a division using the % symbol

    let remainder = 3%2;

    ##### Output: `1` . Because, `³⁄₂` = `1 Β½`, so 1 is the remainder
  • Floats:

    • Floats are literally decimal numbers in JavaScript. They can also be referred to as doubles.

    let myFloat = 7.89;

  • Incrementing.

    • You can add to variables using ++ or by simply using a number.

    let myNumber = 7;
    // Incrementing.
    console.log(myNumber + 3);

    ##### Output: `10` .
  • Augmented Operations.

    • Augmented Operations is basically using operations on variables defined to numbers.

    let a = 5;
    let b = 7;
    let c = 3;

    // Augmentation
    a = b + c
    b = a - c
    c = a * b


    ##### Output: ```js 10 7 70

String Manipulation

Using single quotes.

When using a type of quote in a string, the quotes you use outside would be the opposite as not to confuse the IDE. Or you can use a backslash \ to prevent this. Here are quick examples:

// Using let myString = 'This is my string using "double-quotes" and JavaScript does not get confused!!!'; let myString = "This is another string using \"backslashes\" and JavaScript does not get confused!!!"

Escape Sequences.

Escape Sequences are used to manipulate a string using a backslash and a letter. There are 6 main escape sequences(other than the ones i already told you).

  • \n Creates a newline:




  • \r Creates a Carriage return. Replaces the characters after the sequence with the ones behind the sequence.

    console.log(" llo\rHe")

    Output: `Hello`
  • \t Creates a TAB.


    Output: `Hello... BYE`
  • \b Erases the previous character and replaces with the character after the sequence.


    Output: `Hello`
  • \f Forms a feed, i.e A \n with a \t




  • Concatenating a string.

    • You can add two strings using a + operator.

    console.log("Hello, " + 'John')

    Output: `Hello, John`
  • Concatenating a string using +=.

    • You can add two strings also using a += on another line. You can also do this with variables.

    var ourStr = 'Hello, ';
    ourStr += 'John';


    // adding variables
    var introduction = "My name is, ";
    var firstName = 'John ';
    var secondName = 'Smith';

    console.log(introduction + firstName + secondName);

    Output: `Hello, John`

Finding items in a string.

JavaScript allows us to find things in a string, for example the length of the string, the nth character, the last character etc.

  • Finding the length of a string.

    • We can find the length of a string using .length in JS. It will return the number of characters in the string, including spaces if there are any.

    var name = 'John';


    Output: `4`
  • Bracket notation.

    • Bracket notation can be used to find the index of a character in a string. The brackets we use are squre: [] and the first index starts with the number 0.

    var name = 'John';

    // This will return the character at index 0, which is the first character, 'J'
    // This will return the character at index 0, which is the second character, 'o'

Exercise 1

This is an exercise for you. Here is the prompt:

Write a program that is going to use augmented operations to write a BODMAS (Brackets, Orders, Division, Multiplication, Addition, Subtraction.) to print an answer of 9. Use the numbers 3, 6, 2, 8, and 4 only. Use variables from 'a' to 'e' for each of the number. Then use the variable calculation to do the math using the varaibles. Next, print out the following sentence in the exact fomat using string concatenation and escape sequences.

I used the numbers with "BODMAS" to find the answer of 9. The numbers used were: 3, 8, 6, 2, 4

** Note: Use only string concatenation. **

Solution, Exercise 1.


let a = 3; let b = 2; let c = 6; let d = 8; let e = 4; var calculation = ((a * c + d) / b) - e; console.log("I used the numbers with \"BODMAS\" to find the answer of " + calculation + ".\nThe numbers used were:\n" + a + ', ' + b + ', '+ c + ', ' + d + ', ' + e)

Hope you got it.

User Input.

We can get user input in JavaScript using the prompt function, which is defined to a variable name. The prompt asks the user to input something. We can use that input to print out fancy things.

var userName = prompt("Enter your name ") console.log("Hello, " + userName + ". Welcome to JavaScript.")

So if we input John, we will get, Hello, John. Welcome to JavaScript..

Converting data types.

We can change an integer to a string and vice versa in JS. We can do that using the parseInt and toString methods. To do that, we can define a varibale, and use these functions to convert them into a different datatype.

// Change string to integer: var num = 9; var n = num.toString(); console.log(n) // Change integer to string: var num = '9'; var n = parseInt(num); console.log(n)


Single Arrays

Arrays in JS are basically lists, that can contain items and can be modified. The syntax of writing an array is using a set of square brackets [], and inside, the items separated by commas. Lets define an array:

// Array containing John's first name and his age. var myArray = ["John", 21];

Accessing Array Data

We can access array data using the same way we access data and characters in a string. We can use the index of the list, once again, starting from 0.

var myArray = ["John", 21] console.log(myArray[0]) // -> John console.log(myArray[1]) // -> 21

Nested Arrays.

Nested Arrays, or Multi-Dimensional Arrays in JavaScript and in any other programming language, are a bunch of lists contained inside another list. The arrays in the larger array are treated as single elements and are separated by commas. Here is an example:

// Nested list of my favorite movies/shows (not IRL lol) with their directors. var myFavMovies = [["Alex Rider", "Andreas Prochaska"], ["Avengers: Endgame", "Russo Brothers"], ["The Matrix", "The Wachowskis"]]

Accessing Nested Array Data

Accessing data in Multi-Dimensional Arrays is the same as accessing elements in normal arrays, except first we need to refer the index of the list in the array, and then the elements in the list. Here is an example:

var myFavMovies = [["Alex Rider", "Andreas Prochaska"], ["Avengers: Endgame", "Russo Brothers"], ["The Matrix", "The Wachowskis"]] console.log(myFavMovies[1]) // Returns Second list in myFavMovies array. console.log(myFavMovies[1][0]) // Returns Second list in myFavMovies array and then the first element in it.

This is helpful if we want to print out information from the lists into a nice statement like:

var myFavMovies = [["Alex Rider", "Andreas Prochaska"], ["Avengers: Endgame", "Russo Brothers"], ["The Matrix", "The Wachowskis"]] // We can use this feature to print a statement: console.log("\nOne of my favorite movies is " + myFavMovies[1][0] + ", directed by " + myFavMovies[1][1] + ".")

Output: One of my favorite movies is Avengers: Endgame, directed by Russo Brothers.

List manipulation.

  • .push()

    • We can add elements into an array in JavaScript using the .push() function. The push() function will ad an element to the end of an array. We know it is a function because of the parentheses in the end.

    let users = ['John', 'Ann', 'Mark'];
    // New user
    let newUser = 'Martin';

    // "users" will now be ['John', 'Ann', 'Mark', 'Martin' ]

  • .unshift()

    • .unshift() is the same as .push() but, .unshift() adds elements to the start of the list.

    let users = ['John', 'Ann', 'Mark'];
    // New user
    let newUser = 'Martin';

    // "users" will now be ['Martin', 'John', 'Ann', 'Mark']

  • .pop()

    • We can remove only the last element in an array using the .pop(). This will then return the same array without the lat element, so then the new array's last element will be the second last of the initial list.

    let users = ['John', 'Ann', 'Mark'];
    // New user

    // "users" will now be ['John', 'Ann' ]

  • .shift()

    • .shift() is the same as .pop() but it is the opposite. .shift() removes the first element from the array, not the last.

    let users = ['John', 'Ann', 'Mark'];
    // New user

    // "users" will now be ['Ann', 'Mark' ]

Object Literals

Objects in real life are literally things that have propetrties, like a bag is an object, it's color is its property. The same way, objects in JavaScript are the same, but we use key:value pairs to define them. The value is defined to the key using a colon. This is an example of an object in JavaScript.

let replitInfo = { yearFounded : '2016', placeFounded : 'San Francisco', funds : { funder1 : 'Andreessen Horowitz', funder2 : 'Y Combinator', funder3 : 'Bloomberg Beta' }, founders : { ceo : 'Amjad Masad', coFounder1 : 'Faris Masad', coFounder2 : 'Haya Odeh' } }

As you can see, you can have multiple objects in an object. And all new objects are separated by commas.

Accessing Object Data.

We can access data in Objects using a . after the name of the object and referring to the key name, which would give us the value. So to access the place where replit was founded, the placeFounded key, we do this:

// Get a place where replit was founded console.log(replitInfo.placeFounded)

This will return the value for placeFounded, which would give us San Francisco.

To access the data inside another object in the object, we will use the . to access the object, and then another . to access the keys inside that object.

// Get name of a funder. console.log(replitInfo.funds.funder1)

So first we will access the funds object and then inside we will access fund1.


Functions are used to "encapsulate" a few lines of code that are meant to accomplish a specific task. Once a function is written, it can be used over and over and over again. Functions can be "called" from the inside of other functions. The syntax of defining a function is using a pair of brackets after the function name which comes after the keyword function and all the code that has to be executed in a pair of curly brackets.

function myFunction(){ console.log("Hello, World"); }

Now if you run the program, nothing happens and that is because the function gets allocated into the computer's memory, but doesn't get called, and thus nothing happens. To actually interpret the code in the function, we need to call it.

// Create function function myFunction(){ console.log("Hello, World"); } // Call functions myFunction();

Parameters and Arguments.

Arguments are values that can be input into the function that can be given when calling the function. Parameters are the values that is given by the arguments. Confusing? Let me explain practically.

function myAddition(a, b) { // a and b in the parentheses are the parameters. console.log(a - b) } // Now, we are going to pass in the arguments myAddition(10, 5) // 10 is equals to a, and b is equals to 5. Up in the function, we did a - b, so we are basically doing 10 - 5.

Returning a value from a function.

A return statement simply returns a statement. Instead of console.log(), we can just use return. Although, console.log() is a function used to print information to the console. return on the other hand is a call to pass some value back up to where the call was made. Here is an example:

function myAddition(a, b) { return 'Two numbers are ' + b + " and " + a + "." } myAddition(10, 5)

Global vs Local.

Global scope is when a variable is defined outside a function. This variable can now be used anywhere in the whole code, in any function. For example this code has a variable defined outside the printNumber function. So, it can be used in any function:

var number = 6; function printNumber() { console.log(number) } printNumber()

Local scope is when a variable defined in a function can only be used in the same function block, and will not work in other functions.

function defineNumber() { var number = 6; } function printNumber() { console.log(number) } printNumber()

But here, we get an error : number is not defined, which is because the scope of the variable number, is only limited to the function printNumber .

Boolean values.

Boolean values are simple values that evaluate to true, or false. They are basically like on and off switches, were on means true, off means false. All numbers return true, except 0 which return false.

// Returns False function myFalseFunc() { return false; } // Returns True function myTrueFunc() { return true; }

Getting to know the data type.

We can know the data type of a variable using the typeof.

var aNumber = 9; var aString = "Hello" var booleanValue = false; console.log(typeof aNumber); console.log(typeof aString); console.log(typeof booleanValue);


number string boolean

If statements.

If statements are basically conditionals, they are used to make decisions. If statements are english like and do something, if something is what we have set it to be. Here is how we would define an if statement. The == operator compares the value or equality of two objects.

var number = 5; // Literally means, if the number variable is true, do whatever is in the brackets. if (number) { console.log("Number") }

If statements' operators.

Operators in if statements consists of ==, >, >=, <, <=. These are just like math inequalities. Here is an example:

var number = 5; var number2 = 7; var trueValue = true; // If number is equals to 5. if (number == 5) { console.log("Number is 5") } // Prints out "Number is 5" because number is set to 5. // If number 2 is greater then 10: if (number2 > 10) { console.log("Number is greater than 10") } // Prints out nothing because number2 is set to 7, which is smaller than 10. if (number2 <= 10) { console.log("Number is smaller than or equals to 10") } // Prints out "Number is smaller than or equals to 10" because number2 is set to 7, which is smaller than 10. // Will execute the code in brackets if value is true. if (trueValue) { console.log("True Value") }

Note: If we don't put any operator, then it is going to check the boolean value of the value and execute code if it is true.

Else statements.

Else statements do something if the previous conditionals do not meet the requirement.

var age = 12; if (age >= 18) { console.log("You meet the consent age.") } else { console.log("Nope, you are too old.") }

"Nope, you are too old." will be printed out because age is less then 18 and all other ages under 18 will be ignored.

The && and ||.

&& means and and || means or. && compares all values and if they are true, the code will run. The ||, will run if either of the given conditions evaluate to true.

// "&&" example let number = 32; if (number > 20 && number < 40) { console.log("Number is smaller than 40 and greater than 20") }
// || example let number = 32; if (number == 25 || number < 40) { console.log("Number is smaller than 40 or equals to 25") }

Else If Statements.

Else if statements are executed after the initial if statement.

let number = 11; if (number == 9) { console.log("Number is 9") } else if (number == 11) { console.log("Number is 11") }

While loops.

A while loop will run as long as some conditional is true. While loops are english like. "While something is true, run this code."

let num = 0; while (num < 5) { console.log("Number is smaller than 5") }

But this will run forever an never stop. To stop the program once it has done what we want, we use a break statement.

let num = 0; // Will print "Number is smaller than 5" only one time. while (num < 5) { console.log("Number is smaller than 5") break; }

Switch Statements

Switch statement are used to perform different actions in different conditions. They are basically used to avoid repetition of if statements. Here is the syntax of writing a switch statement, which is usually embedded in a function.

function switchStatement(expression) { switch(expression) { case x: // runs this code block if expression equals to "x". break; case y: // runs this code block if expression equals to "y". break; default: // runs this code block if expression is not equals to any of the above cases. } }

Lets make a switch statement that relies on user_input to print out the name of the day, relative to the number. Try it out yourself first. Here is my solution:

var user_input = parseInt(prompt('Enter day number ')); function getDay(expression) { switch(expression) { case 1: console.log('Monday') break; case 2: console.log('Tuesday') break; case 3: console.log('Wednesday') break; case 4: console.log('Thursday') break; case 5: console.log('Friday') break; case 6: console.log('Saturday') break; case 7: console.log('Sunday') break; default: console.log("No day on this number.") } } getDay(user_input)


Enter day number > 7 Sunday

I used parseInt to convert the user input into an integer because it is initially a string.


I hope this course is enough to build your foundations on JavaScript and its syntax. There are many courses on YouTube that build more knowledge on these topics. Here are a few on Youtube:


Credits to

's brain for contributing to 100% in making the tutorial. Also thanks to
for picking out spelling mistakes and asking me to add a few more touches.

And also, there are tons of mistakes in grammar and spelling. So if you find any, tell me and I will fix it πŸ€™πŸ€™πŸ€™
Profile icon
Profile icon
Profile icon
Profile icon
Profile icon
Profile icon
Profile icon
Profile icon
Profile icon
Profile icon
Profile icon

A tutorial... that's not for Python...?

Profile icon

Yeah, I kind of started getting annoyed by the number of Python tutorials there were and how no one made a real comprehensive tutorial for other languages, so I made this.


Profile icon

✨ awesome ✨

Profile icon

thanks, man.


Profile icon

Really cool!

JavaScript (often shortened to JS)

Lol when I read this sentence, it reminded me of how some people incorrectly think that Java is short for Javascript xD

Also, you could add that you can use multi-line comments (/* */) instead of individually commenting out each line with (//):

/* Hi Wow Loads of lines Pog */

And I saw someone suggested adding for loops; why don't you add them? You could add them in a Loops section with the while loops. :)

Anyways, great tutorial! :D

Profile icon


Lol when I read this sentence, it reminded me of how some people incorrectly think that Java is short for Javascript xD

So true. I have also seen many people confuse java with javascript. Mainly because they are both popular, and were released in a one-year gap.

About the comments, yeah I didn't talk about multiline comments. Imma add it dw.

I will add for loops soon. Blame school.


and lastly, THANKS.


Profile icon

Lmao alright.
No problem! :)

Profile icon

Thanks for all the hard work you put into this. Updoot :)

Profile icon

thanks. or should I say you are welcome?


Profile icon


Profile icon

xd. Which ever you want.

Profile icon
And also, there are tons of mistakes in grammar and spelling. So if you find any, tell me and I will fix it πŸ€™πŸ€™πŸ€™


So here you mistyped the off:

Here, you mistyped Statements and both Numbers.


Here you mistyped program and doesn't:


...keyword and are...




...and that's all I found! (There could be more though)

Don't worry though, in my previous tutorial I also made so many typos! I fixed most of them by now!

Also, you can add for loops, alert, confirm, switch cases, document objects, and importing modules!

Nevertheless though, I absolutely like it! Keep up the good work...

...and congrats on getting to the HOT section!

Profile icon

Thank you so much!! I learned a lot

Profile icon

Thanks. Hope it is useful, stay tuned for more topics coming on this. BTW, you can make a new comment also...


Profile icon
  1. Thanks for the grammar errors corrections.
  2. Fixed all of them.
  3. I didn't add for loops because they are a little complex and need three different things you need to define. I will add them though.
  4. alert, confirm and document are not added because they require HTML and I don't want to go over HTML in an only JS Course.
  5. Switch is coming...

"...and congrats on getting to the HOT section!"

Also, I got Grammarly to fix all the mistakes which you missed. OFC, you are not a computer. NEvertheless, I appreciate your effort in catching these mistakes. Thanks once again.


Profile icon

you're welcome!

Oh yeah, when comparing values with 0, true, or false we need to use triple (yes, triple) equal signs! ===

You can explain the pass and continue keywords as well!

Also, this might help to resolve errors:

//jshint maxerr: 100000 // Change the 100000 to whatever. JS will ignore errors as long as they don't bypass the number!

Also, I like your explanation. Very clear and good!

Profile icon

btw the off typo is still not fixed. You can add toString and parseInt as well! (Sorry if this too much to add though XD)

Profile icon

Here is my explanation:


Off is the opposite of on. As in switch on the light, opposite will be, switch off the light. So the off I used was to express the switch the false boolean value throws...


Of is used to express the relationship between two things. So I am not expresiing any relation over here.

Now this is google's defenition of OF
and google's definition of OFF
Now. You decide what is correct.


Profile icon

well, switches have 2 values which are on and off...

Profile icon

soo... ?


Profile icon

no, what I mean is this typo:


Also, no tutorial is complete so I suggest you to change the title!

Profile icon

oh, you were talking about that. Sorry.


Also, no tutorial if complete so I suggest you to change the title!

ANd, if you will be soooo pushy, FINE, i will change it...

Profile icon

oh sorry if I'm actually THAT pushy XD

Profile icon
(function() { 'use strict'; // Your code here... })();

use that for anti-cheating

Profile icon

so. What does this do?


Profile icon

it prevents ppl from cheating using the e console

Profile icon

thanks for that i will use it on my clicker game


Profile icon

but strict mode disable some features


Profile icon


Profile icon

Thanks :P.


Profile icon

we need html css course and html with js, what about swift?,

Profile icon

Yeah I would love to make those, ONLY if I had the time.


Profile icon

Very nice, thanks.

Profile icon



Profile icon

good tutorial, it helped!

Profile icon

First - really nice tutorial. I have used JS a little bit before and this was a nice refresher.

You might add a little bit in the "if statements" section about what evaluates to true or false. For instance, you have

var number = 5; if (number)

In this case, number evaluates as true, because number is nonzero.
I believe (in JS) a string evaluates as true, unless it is an empty string, like

let str = ''; if (str) console.log(true); else console.log(false); // 'false' is output here - this behavior is not typical of all programming languages

On another note, there was a bit of confusion for me on the else section. After the else, there is

console.log("Nope, you are too old.")

I think you meant to type "Nope, you are too young." or "Nope, you are not old enough."

Again, good stuff here, and thanks for taking the time to write this up!

Profile icon