JavaScript ES6 Tutorial #4 - Default Parameters

preview_player
Показать описание
Yo dudes, in this JavaScript ES6 tutorial, I'll introduce you to default parameters and how we can use them as a fallback option when not other parameters are passed to our functions explicitly.

----- COURSE LINKS:

---------------------------------------------------------------------------------------------
You can find more front-end development tutorials on CSS, HTML, JavaScript, jQuery, WordPress & more on the channel homepage...

========== JavaScript for Beginners Playlist ==========

============ CSS for Beginners Playlist =============

============== The Net Ninja =====================

================== Social Links ==================

Рекомендации по теме
Комментарии
Автор

Short and precise. quite easy to understand

nehamattani
Автор

Great Tutorial, love your series, many thanks

yarkahaji
Автор

Very cool! Net Ninja has the best tutorials on the web!

adaniels
Автор

You are the best man! Easy and simple, nice work!

Автор

you are the best on youtube, thank you

haili
Автор

Nice and neat explaination. Keep it up mate

benedictusaryasatya
Автор

Hello `undefined`, I'm Dad!

btw, really good tutorial, to the point and cristal clear!

oseaniic
Автор

Great tutorial. how could this be used in a constructor prototype function?

tamaralobzina
Автор

I love how ES6 is behaving more and more like Python

temprmj
Автор

Can you set default objects as parameter and override them? I am used to doing this in PHP. Seeing that ES6 now has default parameters is exciting.

necrophage
Автор

BTW, It's not 40, lol, I like your tutorials, thx a lot!

jackshephard
Автор

Good tuts but you missed off how you pass in say just the belt colour?

PaulBrownclk-me
Автор

Also works with functions as a default params like a charm

function callSomething(hey = heyNinja()) {
return hey;
}

function heyNinja() {
return 'Hey Ninja';
}

callSomething(); //Hey Ninja

Peace.

mayankgangwal
Автор

but how can you skip the middle parameter ??? logNinja("shaun", , 40); so it can insert default "red"???

forgiveness_denied
Автор

Great tutorial, however it can be shorter. There's no need to explain further after 2.00 mark

DrDre