Javascript Tutorial For Beginners – #3 Javascript Functions Tutorial

This Javascript tutorial covers functions in Javascript. Functions are a great way to store your code in reusable pieces of Javascript code that can be run at any time.

This is a Free Javascript Course designed for beginners. These Javascript lessons cover the basics of Javascript and programming basics from the very beginning.

In the first 2 lessons, we covered variables, several Javascript types, if else statements & comparison operators. Now, we’ll cover functions.

How I did livereload:
You can also use the editor – they have a great feature called “live preview”


Abhishek Thakur says:

can someone show the css for this page?

serban george says:

Hey, i know it’s an eternity later, but what do you use to build the code, cuz i’m using Node.js and it dosen’t see commands like alert and prompt. Says they are undefined.


“You need a website. WHy not do it with WIx?”
*banjo strumming*
that ad gets VERY annoying after a while xD

code X says:

how about when you have bootstrap because when i did it it didn’t do what it was supposed to

Hasnain Ahmed says:

pretty hard  to take in the first few times

Th3pur3and7he7ain73d says:

For those like me who were wondering the syntax theme is called Glacier.

Kaythia Star says:

Being a beginner at skill rank 0, I am also not following. What the hell is a href? What is the difference between script and body? What the difference text and script? I need a tutorial that assumes I know complete zero about this..which is exactly what is going on.

dspsx says:

I feel like I’ve missed a tutorial.. at first it was super simple and now he’s speaking spanish..

Tyler Johnson says:

Fast forward to 4:18 if you came here to learn about functions.

Andy says:

How did he get his webpage? How to I get to the point he is at, at the start of the video? I have no idea how to get that console he is typing into

Abdullah Shahab says:

function add(x,y)
return x+y;
function Subtract(x,y)
return x-y;
function Multiply(x,y)
return x*y;
function Divide(x,y)
return x/y;

var a=prompt(‘Enter First Number:’);

var b=prompt(‘Enter Second Number:’);

var input=prompt(‘Enter 1 to AddnEnter 2 to SubtractnEnter 3 To MultiplynEnter 4 To Divide’)

else if(input==2)
else if(input==3)
else if(input==4)
the prompt in google chrome gives answer for add function as a string e.g
if i enter 1 and 2 as first and second number, it gives 12 instead of 3….
Please Help SomeBody!

Dustin King says:

Did I miss a lesson between #2 and #1? I felt like I was kicking *$&# after the second lesson. I am so incredibly lost on this, I can’t even begin the lesson. Where is the explanation on how to sync the web and sublime? There needs to be a lesson to explain this lesson. How does one get the web and sublime to work together? What is CSS and HTML? Why are we talking about them? I greatly appreciate the tutorials. As a true beginner, this lesson was unusable. The first two were great.

GhostWavves Evoluzion says:

Similar to python def Function

Cheski Baum says:

videos should flow from one to the next – the first one was good. then you lost it with #2 –

Its a shame , you were good

Kaythia Star says:

OKay…What the hell is an Index Study HTNMl file?! I was so confused with href and other whatthejigits..that I totally missed him mentioning the file. Where do I find? What do I click? How is this helpful? if i can’t freakin practise?

William Budd says:

Terrific video (just like all your others)! Amazing how you make technical concepts accessible to learners of modest competency like me. Your suggestion to practice on our own is *such* good advice.

Noelio Emerald-Isle says:

no sense….I think you fly through it too fast….maybe that’s why

tomtidbury says:

sorry man u lost a viewer this is confusing me and im only like 2 minuites into the vid, i dont understadn what happend when u whent from console to whatever ur using now

Otto Fazzl says:

I have a couple of years of programming in python for data analysis and machine learning, so programming concepts such as functions, recursion and OOP are familiar to me.

However, when I started to learn about web development, I was quickly overwhelmed by all different technologies that are used to make even a simple website: HTML, CSS, JS, jQuery, Ajax, Flask, Bootstrap and so on. I am not even talking about the server side such as ways to configure them and use with databases. So far I understand what are HTML, CSS. I kind of understand that JS is yet another programming language after watching this video but it is not yet clear how to make it interact with elements on the webpage and why it is so useful in web development.

P.S. I really like the style of teaching of this Youtube channel. Thank you for providing an opportunity to learn!

Mâñśì Venkat says:

I didnt know we needed to know html and css to learn this. Now have to go back and learn that.

The Drawing Dutch Man says:

the program is Sublime Text

Serg G says:

great teaching, nice voice and etc.

Kopuz says:

wooo i did a js function

function fib(){
var seq = [0,1]
for (i = 0; i < 10; i++){ seq[seq.length] = seq[i] + seq[i+1]; } return seq; } console.log(fib());

wu Rin says:

Need to know the basic before watching this video. The video is clear and simple that to understand a little further basics. Thank you for sharing.

Thomas Kozar says:

If you want live preview you can use a program called Brackets. I use it and it’s awesome 🙂

Hugh Mungus says:

lmao people pls go learn css and html before coming here. on their website u have to learn html and css first to learn java hence this vid assume u guys know about css and html i think lol

Abeer Shalizi says:

it’s similar to other computer programs especially c and c++

Andy Hsu says:

Can you share your files on the Sublime Text please?

Hunden i Huset says:

I want to get into coding but i don’t know how to set everything up, what program do you need to type in the code (i’m referring to the window on the left), how did he link the window on the right to google chrome? I don’t get it

Vicious Silence says:

I know another programming language, and this is basically the same thing. There a few differences, but nothing huge! This should be a walk in the park for now.

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!