#9 : Understanding Optional and Default Parameters in TypeScript Functions in Hindi

preview_player
Показать описание
Welcome, In this video, you will gain a comprehensive understanding of optional and default parameters in TypeScript functions. We will explore how to define and use optional parameters, which allow you to provide arguments selectively when calling a function. Additionally, we will delve into default parameters, which enable you to assign default values to parameters if no argument is provided.

Throughout the video, we will cover the syntax and usage of optional and default parameters in TypeScript functions, including practical examples and best practices. By the end of the video, you will have a solid grasp of these powerful features, allowing you to write more flexible and robust functions in your TypeScript projects.

😊 Become Member, get access to perks, free Source code, & more..

⌚TIMELINE⌚
0:00 Introduction
0:20 Update on previous video assignment
1:00 Understanding function parameters
4:10 Recommended extension for running JavaScript files
4:49 Exploring default parameters
6:16 Unveiling optional parameters
10:20 Update on upcoming video

************* 😍 Must Watch Videos For Web Development 😍 *************

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

I want your type teacher and thank god I've got you like you are teaching main topics and this is good for someone's

ZainabQureshi-sb
Автор

he explains in a simple and effective language that we connect to.
that's how subject matter should be taught.
lots of respect to you

PoojaGupta-pmok
Автор

Sir, Love And Respect From Pakistan. I've Learned So Much From This Channel. Thank you So Much. Keep It Up <3

jawadsherazi
Автор

best video in yt i have encountered. great job. keep posting such more videos for us sir ji

reenayadav
Автор

"I'm really enjoying this TS course; it's the most amazing course I've ever learned.Thankful of yours.

gaminglovers
Автор

install extention code runer in vs code then code run at button click just try it

websumit
Автор

let welldone : string=(such a brilliant explanation);
console.log(welldone);

saadrao
Автор

I am following your series from episode 1.

kamalkishore-bjyo
Автор

NICE EXPLANATION BHAIYA MAJA BAHUT AA RAHA HAI HAMKO PADHNE ME

shivamsoni
Автор

sir, meri system per ${var_name} ye nahi chal raha hai... js file bhi check ki maine usmein bhi ${var_name} hi print ho raha hai..

gauravrathaur
Автор

sir....please tell us next topic....while ending video....

CHETANRATHOD-eqbx
Автор

mujhe " " double quotes use karne padh rahe hain like "Hi" + var_name + "some message" + other_var

gauravrathaur
Автор

Ans 1:
let arr:number[] =[8, 2, 9, 7, 4, 6];
const calculateAverage =(array[]:number):number => {
let avg = array.reduce((accum, currVal, index, array)=>{
let total = accum+=currVal;
if(index === array.length-1)
{
return total/array.length;
}
return total;
})
}
console.log(calculateAverage (arr));


Ans 2:
let arr:number[] =[8, 2, 9, 7, 4, 6];
const findMaxValue = (array[]: number):number => {
let Max = array.reduce((a:number, b:number) => a > b ? a : b);
}
let Max = findMaxValue(arr);
console.log(Max);

Isko correct kr dijiye @thapatechnical

DEEPANSHU_NAG
Автор

everything is good, but boom guys is irritating

iiitian_aayush
Автор

bhai dakho mind mut krna lakin apni communication skills pr thora focus karo

iztech
Автор

const greet1 = (name:string, id?:number) =>{
if(id){
return `welcome ${name} your id is ${id}`;
}else
return `welcome ${name}`;

}

// function call


console.log(greet1("ramzan", 56));

ramzanchaudhry
join shbcf.ru