Promise .then() and .catch() | JavaScript Tutorial in Hindi #55

Promise .then() and .catch() | JavaScript Tutorial in Hindi #55

CodeWithHarry

1 год назад

220,311 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

InfiniteWonders
InfiniteWonders - 24.09.2023 12:14

promise.finally(()=>{}) is skiped, why???

Ответить
Shoaib Khan
Shoaib Khan - 23.09.2023 11:29

Luckily ...I already have write Loadscript for practicing 😅 even before you asked for

Ответить
Shop with me
Shop with me - 22.09.2023 08:57

initially , you stored the function "Promise" in a variable called "p". So "Promise" is a function nd a function is only executed when it is called , but here the function "Promise" is not called , something like this "Promise(with some parameters in it);" . So how is it executed without calling , i am confused . Pls help me out

Ответить
Premjit Singh
Premjit Singh - 06.09.2023 17:27

can any one explain me whats the difference between the Promise and if else , we can use if else statement to alert the user about the error too right so why use Promise . I am confused

Ответить
Rishabh Bawne
Rishabh Bawne - 05.09.2023 18:24

ye admi koi padma bhushan do he is brilian teacher

Ответить
Shubham Patidar
Shubham Patidar - 29.08.2023 19:41

tau ji be like : tamij nhi hai mere ladke ko

Ответить
Rathan  Arts
Rathan Arts - 29.08.2023 19:29

Thank you harry bro
here is some code on promises:-

let HarryBhaiPromisesClear = new Promise((resovle,reject)=>{
setTimeout(()=>{
let IsPromisesClear = 'Clear';
if(IsPromisesClear){
console.log('Harry Bhai:- Thank you bro for confirmation');
resovle();
}

else{
console.log('video dhubara Dheko samaj aa jayega');
reject();
}
},5000)
})

HarryBhaiPromisesClear.then(()=>{
console.log('Thank You a lot harry bhai make more such type content. ab tho maza agaya')
}).catch(()=>{
console.log('sorry harry Bhai mene apake Promises ka video acha se nahi dheka, ab me ache se dhekunga')
})

Ответить
Bruce Lee
Bruce Lee - 23.08.2023 18:58

In simple words: Promise cosists of two functions, and it returns one of the function's output(either resolve or reject). If it is resolve function then we use Promise.then to output it, if it is reject function then we use Promise.catch to output it. This is what I understood, if it is wrong please let me know, I will learn.

Ответить
Let's_Entertain
Let's_Entertain - 16.08.2023 19:04

Thank you So Much Harry Bhai, coz of you I got a job with 9 LPA . again Thank you so much HARRY sir Hats off

Ответить
Subrata Sadhukhan
Subrata Sadhukhan - 12.08.2023 15:02

मज़ा आ रहा है

Ответить
Herain Pratap Singh
Herain Pratap Singh - 24.07.2023 21:29

kudos for the efforts you put in

Ответить
Ayush Goregaonkar
Ayush Goregaonkar - 24.07.2023 12:26

aatank ka 2 ra name harry bhaiya 🤣

Ответить
133_Rythmn Magnani
133_Rythmn Magnani - 19.07.2023 15:47

Harry vai mashalla padha app bohot achha ho bas editing thodi acchi karni ho to batnaa

Ответить
ADIB PATHAN
ADIB PATHAN - 16.07.2023 20:48

harry bhai your teaching is very well but when you teach any topic then you can also teach us when we use promise and where we use also 😇

Ответить
Aiter
Aiter - 12.07.2023 10:19

👍👍👍👍👍👍😘😘😘😘

Ответить
Divya Jyothi
Divya Jyothi - 03.07.2023 13:34

where i can find promise notes???

Ответить
Divya Jyothi
Divya Jyothi - 03.07.2023 13:33

bro it didn't gave promises notes

Ответить
SAURABH KUMAR
SAURABH KUMAR - 25.06.2023 10:13

harry bhai!!!!!!! Please make videos on salesforce too

Ответить
awais blouch
awais blouch - 14.06.2023 17:18

harry bhai error catch ni kr rha mry sy

Ответить
Tier3
Tier3 - 08.06.2023 09:20

Ye moti bar bar ajati hai, isko bolo ki pehle apna fat Kam kre

Ответить
Gaurav Kumar
Gaurav Kumar - 05.06.2023 11:32

HTML, CSS, JS run nhi ho rha?

Ответить
shivam kumar
shivam kumar - 31.05.2023 15:06

reject ka matlab mujhse behtar kon jaan sakta hai🥲🥲

Ответить
anonymous
anonymous - 25.05.2023 19:27

harry bhai samjaneke liye handwriting notes use mat kare ppt use kare please apki video ab but gandi ati he notes ke sath

Ответить
Gameboyl
Gameboyl - 18.05.2023 18:05

kaafi dificult ho chuka hain 😭😭but ill not give up 💪💪💪💪💪💪

Ответить
Mehtab Butt
Mehtab Butt - 18.05.2023 11:20

alo paratha, 😆 you have such an amazing way of teaching.

Ответить
Rahul
Rahul - 06.05.2023 08:05

The GOAT .

Ответить
JAINISM INSIGHTS
JAINISM INSIGHTS - 04.05.2023 14:07

worst explaination

Ответить
Dhruv Polara
Dhruv Polara - 20.04.2023 12:50

ye itna complicated he ki harry bhai bhi sahi tari ke se nahi bata pa rahe he

Ответить
Prince Shekhawat
Prince Shekhawat - 19.04.2023 10:30

so it's basically like error handling in Java.

Ответить
prem Mourya
prem Mourya - 11.04.2023 09:54

Harry bhai padhai m disturb ho rha h add band krwa do 😁

Ответить
Sonu Singh
Sonu Singh - 07.04.2023 05:44

I am getting error like promise is not defined i have written as u have done.

Ответить
It'x Saad Gaming
It'x Saad Gaming - 26.03.2023 08:11

Ответить
bodhit darji
bodhit darji - 18.03.2023 12:17

Konsa chapter download karna hai?

Ответить
Banoj Kumar Mishra
Banoj Kumar Mishra - 16.03.2023 10:34

The way he conquers every language is just phenomenal. Even programming languages are now scared of Harry bhai The God of code🎉

Ответить
Ishita Chakraborty
Ishita Chakraborty - 13.03.2023 10:36

This was such a great help for me , after years of going through monotonous definitions , i finally understood ...Thank you sir !

Ответить
RamjiMishra
RamjiMishra - 07.03.2023 21:23

I love❤ you sir🥰😍

Ответить
Harsh Srivastav
Harsh Srivastav - 01.03.2023 14:04

allo parntha bhok lg gyi harry bhai...😅

Ответить
Sahil Arora
Sahil Arora - 26.02.2023 20:33

Bhaiya yr aap ne jaise ye javascript ki series alag alag krkr video banaya hai waise hi react.js ki bhi banana

Ответить
Yogita Modi
Yogita Modi - 16.02.2023 15:40

how we will know that where to use resolve and where to use reject ,
and if we are using (reject callback function) then why we are performing that task in promise.
and if we are using (resolve callback function) then, do we have to use both then and catch method

Ответить
Ibrar ul haq
Ibrar ul haq - 13.02.2023 00:24

hi, harry bhai. I have a question that can we do business in programming? kindly must reply.

Ответить
Aniket
Aniket - 12.02.2023 10:48

next level typing sound...🤩

Ответить
Sami Alvi
Sami Alvi - 29.01.2023 19:33

Harry sir is one of a kind💞

Ответить
Ayush
Ayush - 27.01.2023 11:18

Jisko samajh nahi aaya bo focus hoke with practice baar baar dekho ho jaayega but don't give up

Ответить
Mirishfaq hussain
Mirishfaq hussain - 14.01.2023 10:16

Wow awsome sir

Ответить
Nipun Mudgal
Nipun Mudgal - 13.01.2023 22:46

King 👑👑

Ответить
Tech Nikal problem
Tech Nikal problem - 02.01.2023 01:32

Thank you sir for creating this video!

Ответить