#14 JavaScript Functions | JavaScript for Beginners

preview_player
Показать описание
A function is simply a “chunk” of code that you can use repeatedly, rather than writing it out multiple times.

In this video, we will learn about functions in JavaScript. Functions are one of the fundamental building blocks in JavaScript. To use a function, you must define it somewhere in the scope from which you wish to call it.

Watch the full video to have a clear understanding of the working of JavaScript functions.

~

Timestamps:
00:15 JavaScript Functions
04:02 Function arguments
05:40 Passing Multiple Arguments
07:23 Return Value from a Function
10:06 JavaScript Built-in Functions
11:57 JavaScript Arrow Function
12:19 Programming Task
12:55 Quiz

Find Programiz elsewhere:
---------------------------------------------------

#14 JavaScript Functions | JavaScript for Beginners
#programiz #jstutorial functions #javascript #function #learncoding
Рекомендации по теме
Комментарии
Автор

🚀Learn JavaScript with a more hands-on experience with Programiz PRO.
Get 60% off on our Lifetime plan this Black Friday - pay once for skills that pay you forever!

programizstudios
Автор

function canVote(age)
{
if(age>=18)
return true;
else
return false;
}
if(canVote(9))
{
console.log('You are Eligible to vote')
}
else
{
console.log('You are not Eligible to vote')
}

yfjsdgzjdnfn
Автор

function canVote(age) {
if(age < 18) {
return true;
}else{
return false
}
}

console.log(canVote(17));
console.log(canVote(24));
console.log(canVote(65));

RubyKituli
Автор

can you explain closure in your upcoming video?

vishwankvrai
Автор

Answer:

function canVote(age){
if(age >= 18){
console.log("You are Eligible to vote");
}else{
console.log("You are not Eligible to vote");
}
}
canVote( ) // canVote(Enter your Age)

BarathV-feky
Автор

function canVote(age) {
if (age >= 18) {
console.log("You can vote!");
} else {
console.log("Sorry, you're too young");
}
}

let age = parseFloat(prompt('How old are you? '));

canVote(age)

LiamWalker-rd
Автор

Math is not defined in the call, so you will get an error.

racingfan
Автор

function canVote(age) {
if (age >= 18) {
console.log("You can vote!");
} else {
console.log("Sorry, you're too young");
}
}

//let age = parseFloat(prompt('How old are you? '));
canVote(17)
canVote(20)
canVote(65)

ishimweelyse
welcome to shbcf.ru