Javascript Interview Questions ( Functions ) - Hoisting, Scope, Callback, Arrow Functions etc

Javascript Interview Questions ( Functions ) - Hoisting, Scope, Callback, Arrow Functions etc

RoadsideCoder

2 года назад

120,625 Просмотров

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


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

Anand kumar
Anand kumar - 22.07.2023 23:12

var username='Addy negative';

var user={
rc1:()=>{
console.log('my name is '+this.username)
},
rc2(){
console.log('my name is '+this.username)
}
}

user.rc1(); // "my name is Addy negative"
user.rc2(); // "my name is undefined"

Why closure property is not working for rc2() ?????

Ответить
Akash Chaudhary
Akash Chaudhary - 04.06.2023 08:56

@akshaymarch7 did it before it was cool! Huge respect for the man really. And kudos to guys like you who are helping us learn over top of what we learned from NamasteJs

Ответить
Beauty live
Beauty live - 28.05.2023 21:46

Thanku Bhaiya

Ответить
devVISION
devVISION - 19.05.2023 14:39

Is JavaScript is same as DSA ???? because these type of questions i use to solve in dsa

Ответить
kaiji San
kaiji San - 27.04.2023 04:15

interview questions on javascrit is to find out if you know how javascript's syntaxes and rules are all over the place

Ответить
POORNA NAYAK
POORNA NAYAK - 21.04.2023 07:17

hi, i dint understand your question number 7. solution. Why did 'var' print 5 evrytime when it was initialzed from 0 in for() loop. Can u please explain..??

Ответить
DS
DS - 11.03.2023 14:20

Thanks you for this 💛

Ответить
Daksh Tevathia
Daksh Tevathia - 23.02.2023 09:34

Functions are first class Objects/Functions in JavaScript.

Ответить
Alexey Poltoradnev
Alexey Poltoradnev - 25.01.2023 16:48

Thank you so much.

Ответить
Prem Singh
Prem Singh - 06.01.2023 05:36

Ответить
Rishi Rathore
Rishi Rathore - 31.12.2022 07:51

amazing

Ответить
sarthak bansal
sarthak bansal - 13.10.2022 18:34

13-oct

Ответить
Kamkhohao S L
Kamkhohao S L - 06.09.2022 02:26

You explain it so well , loved tNice tutorials tutorial.

Ответить
🦾 D_E_V_E_L_O_P_E_R 👽
🦾 D_E_V_E_L_O_P_E_R 👽 - 27.08.2022 17:00

The examples of callback function you gave are all called higher order function instead these functions accept callbacks as an argument.
Ya I can understand that sometimes they confused us lot don't worry , stay connected with us we all need your content we are liking this so much.

Ответить
Nibsprogramming
Nibsprogramming - 13.08.2022 10:13

Thanks for sharing 👍

Ответить
vishal zinjade
vishal zinjade - 09.08.2022 10:11

Very Nice Video !!
In last question, I guess one point is missing.
In arrow Function, hoisting doesn't work (It only works for regular function).

For example:
This will work:
console.log(addNum(5, 6))
function addNum(a, b) {
return a + b
}

But This one will not:
console.log(add(5, 6))
const add = (a, b) => {
return a + b
}

Please correct me.

Ответить
naren k
naren k - 03.08.2022 04:48

Tell me the difference or why we need use function expression and iife

Ответить
Rahul Yadav
Rahul Yadav - 26.07.2022 11:43

now i am in a good mood

Ответить
crystalclear
crystalclear - 21.07.2022 14:22

Can you make series for MERN interview questions

Ответить