Комментарии:
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() ?????
@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
ОтветитьThanku Bhaiya
ОтветитьIs JavaScript is same as DSA ???? because these type of questions i use to solve in dsa
Ответитьinterview questions on javascrit is to find out if you know how javascript's syntaxes and rules are all over the place
Ответить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..??
ОтветитьThanks you for this 💛
ОтветитьFunctions are first class Objects/Functions in JavaScript.
ОтветитьThank you so much.
Ответитьamazing
Ответить13-oct
ОтветитьYou explain it so well , loved tNice tutorials tutorial.
Ответить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.
Thanks for sharing 👍
Ответить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.
Tell me the difference or why we need use function expression and iife
Ответитьnow i am in a good mood
ОтветитьCan you make series for MERN interview questions
Ответить