TypeScript Tutorial #8 - Function Basics

preview_player
Показать описание
Hey gang, in this TypeScript tutorial we'll talk more about Functions, optional arguments & return types.

🐱‍👤🐱‍👤 JOIN THE GANG -
----------------------------------------
🐱‍💻 🐱‍💻 My Udemy Courses:

🐱‍💻 🐱‍💻 Course Files:

🐱‍💻 🐱‍💻 Other Related Free Courses:

🐱‍💻 🐱‍💻 TypeScript Docs:

🐱‍💻 🐱‍💻 The Net Ninja Community Boards:
Рекомендации по теме
Комментарии
Автор

I never thought that typescript would be so easy to learn if you have some understanding of JavaScript and the concept of compiled languages. I'd been putting it off but I'm so glad I found this. You explain everything so well - it's so thorough. I find that most videos forget to explain reasons and differences in syntax changes - this is a point that drives me crazy about switching between languages - it gets overlooked so often (at least it was in my training)😅

aerial_silks_sierra
Автор

The reason you sometimes have to explicitly mention the return type is when you assign the return value to a variable which is supposed to have a certain type. Typescript can then check if you are assigning a valid return type to your variable.

cedrics
Автор

Thank you so much Shaun Pelling. You are a doing great contribution to web dev community around the globe.

Shakeel
Автор

This is the most sort series on type script. thankyou so much!!

nidhi
Автор

very useful series! can't wait for more advanced lessons =)

alexandr
Автор

I realized that when you a tell that both of the parameters must be number (a: number, b: number), and you assign a string (for example, add(6, "abc")), there was no error but the result will be joining of both arguments (6abc).

alimirhashimli
Автор

great explained in simple langauge ....love from India 🥰

vivekyadav
Автор

This tutorial is really good to watching, you can enjoy your learning and understand everything clearly ;)

marcinkalmar
Автор

Thank you Master Splinter (AKA: Ninja Shaun) 🧙‍♂

rorygrignard
Автор

add will still be Function 7:49 but the return is void?

brillrayel
Автор

At 5:00, iirc Python requires default parameters first right? So that's reversed in TS/JS I guess.

EnglishRain
Автор

BTW who's that one disliker.
Great work Ninja

amanpreetsinghbawa
Автор

I guess something changed since the recording of the video as this code works fine
add = (a: number, b: number, c: number) =>
{
return a + b + c
}

let result = add(3, 3, 4)

result = 'hey'

ayazrzayev
Автор

"Void is a complete lack of any kind of value" - I dare to disagree since function can return undefined, or null. Your description matches the "never" keyword

arturmostowiak
Автор

Good morning net ninja I Haven question: in real work are we really use this(a:number, b:number |string) really man are we, please man you must teach us real one, could you please 😊😅😅

absm
Автор

Is there any purpose first function was define by "let" and second function define by "const"

upcomng
Автор

how do i get my visual studio to look like this, mine looks so cramped and no so clean

ajazmiah
join shbcf.ru