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)); ---------------x--------------- 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
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
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 understanding.........
"I'm really enjoying this TS course; it's the most amazing course I've ever learned.Thankful of yours.
Sir, Love And Respect From Pakistan. I've Learned So Much From This Channel. Thank you So Much. Keep It Up
best video in yt i have encountered. great job. keep posting such more videos for us sir ji
best typescript tutorial in youtube
yes i am watching all the videos 🧡
I am following your series from episode 1.
u r not watching series buddy,😊 u called it lesson or videos it's good.
NICE EXPLANATION BHAIYA MAJA BAHUT AA RAHA HAI HAMKO PADHNE ME
let welldone : string=(such a brilliant explanation);
console.log(welldone);
install extention code runer in vs code then code run at button click just try it
Mast explained bhaiyaa❤
sir....please tell us next topic....while ending video....
Thank you so much sir.🕶🕶🕶🕶🕶🕶
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..
I have done this task using an array
I am back
mujhe " " double quotes use karne padh rahe hain like "Hi" + var_name + "some message" + other_var
7:16
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));
---------------x---------------
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
Awesome, Keeep it up
@@ThapaTechnical awesome ni ,run ny ho rha h , errors aa rha h, plz check @ThapaTechnical
@@DEEPANSHU_NAGbhai jo array[] likha hai na parameter me usme se [] hatado
@@Radhe_radhe2929 ni kaam kiya
@@DEEPANSHU_NAG bhai parameter me aise likho array:number[]
everything is good , but boom guys is irritating
bhai dakho mind mut krna lakin apni communication skills pr thora focus karo
Apny jisko waiktee ko bola osnay apko ignore kr deya, kaisa lag rha hy apko.
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"));
console.log(greet1("ramzan",56));
The extension name is code runner
vscode:extension/formulahendry.code-runner
😂