Hi Guys Good Day and a Happy New Year 🎆🎆🎆!
This is a long one, so bear with me for a second or an hour. In every answer for every questi...
For further actions, you may consider blocking this person and/or reporting abuse
It's funny how interviews often focus on memorization these kind of things, which are the easiest things to look up when you need them.
Half of these things i encountered and used without' having to know the right name for what i was doing, so whats the value?
Very rarely do i get asked about my thoughts on MVC, component orchestration, function vs Class based programming, what over-engineering is, interesting problems i have solved and how, or just maybe how i handle differences of opinion in PR's.
Comparatively speaking, having those kinds of discussions seem much more relevant than whether or not i have memorized all the latest programmer pop culture and random terms one might use once every blue moon.
That being said.
This is a nice list to memorize if you wanna play the default interview game.
Which i might in the future, so thanks! :)
I feel you man but most of the time memorizing or knowing this things are not about answering an Interview problem or problems but solving a problem you are having with JavaScript and btw Glad you like it!!!
Great article, well done! 👏
If I was asked any of these at a job interview, I couldn't answer a single one 👍
Thanks Kiss 😁
Regarding Question 24, I want to really understand "this" so I tested each example in the Console. I found a different result than what you shared for this line...
myFavoriteObj.guessThis();
You wrote that it logs the window object; however, I'm seeing that in normal mode it logs nothing and in strict mode it throws an error. Maybe it is working differently on your browser? I'm using Chrome 81 on Mac.
By the way, I am enjoying studying this post. Thank you!
Thanks, for finding my mistake. I edited it just now. No problem man, glad you like it.
Believe it or not, I'm still going through your list and taking notes. This is a very cool post.
By the way, I've cleared my browser cache the graphic is the same. Maybe it's cached on the server side?
I've changed the object.
It looks like this now.
`
Thanks
Ah, I see the change now. You removed
.name
from where it used to sayconsole.log(this.name);
Thank you!Your welcome. Thanks, again for finding my mistake.
Hey , even now i think there is a problem.
Shouldn't it be
this.name = "Ford Ranger";
rather than
var name = "Ford Ranger";
for question number 24 ?
Nice work! Most of these are pretty good. If you're a hiring manager reading this though, I'd caution against asking questions like "is using the + or unary plus operator the fastest way in converting a string to a number?" because it really doesn't matter and you shouldn't make hiring decisions based on one's knowledge of that.
Great set of questions :) I want to clarify one thing though: "What does the && operator do?" - It does not return last "truthy" or "falsy" value. It returns the last value it has to calculate to determine the truthiness of the whole expression, eg.
0 || 0 || 0
- will return0
and1 && 1 && 1
- will return1
. So the statement in the article is not 100% accurate :) Can't wait to see the update ;)G.O.A.T
Mark, you did a grate job. I am finding this list very useful. In a way, it even helped me to make the list of questions for our small organisation(I have even sent it to some of our HRs))) So, believe it or not ..It is used now in practical way in the eastern EU))))If being completely serious, I would recommend more Typescript questions. I know this is the JavaScript Int. Q. I really thing < that using of typescript is growing tremendously. Anyway , great Job, Mark. Thank you.
Hi Alecc, I'm really glad that you like it. That's a nice suggestion. I've been using typescript for over two years now and it's really great it makes your JavaScript code more readable and maintainable. I'll make some questions in the future. Thanks and God bless.
Yes,m Mark, that is amazing how fast the Typescript "cases" grow. I mean , two years ago I have the project, where I had one TS file and I do not even remember why. But now. My team just received a source , There were no JS file extension. TS, TSx). I am, actually, just starting with Typescript.
Great !
Personally, I think that good interviews should be focused on data flows and performance optimization, and asking about certain API's should be only for choosing the right question as an interviewer.
Also, interviewers should understand the difference between someone who is not knowing something, to someone who is not capable of learning something new.
Good luck for everyone :)
Hi! Many thanks for the article, it's really very useful)))
And one thing in Question 31:
const result = strs.reduce((acc, currentStr) => acc + str, "");
I suppose you mean "currentStr" instead of "str" ;)
I edited it just now. Thanks.
“let x = 5;
x = (x++ , x = addFive(x), x *= 2, x -= 5, x += 10);
function addFive(num) {
return num + 5;
}
If you log the value of x it would be 27. First, we increment the value of x it would be 6, then we invoke the function incrementBy5(6) and pass the 6 as a parameter”
Do you mean addFive(6)?
I’m new to js, so I’m probably wrong.
Thanks for telling me this little problem 😁
Thanks for writing the article. I’m enjoying it.
Also,
reduce.apply(obj1, [1, 2, 3, 4, 5]); // returns 15
reduce.apply(obj2, 1, 2, 3, 4, 5); // returns 15
Did you mean reduce.call obj2, 1, 2, 3, 4, 5); ?
Thanks again 😁
Great article. Very informative. For the question 34, 35 and 36. The implementation might not be quite accurate. You might wanna re-check. For example, to map(), we just pass the
callback
function. While in your implementation above, you are passing botharray
andcallback
to the map(). The array will be available asthis
inside the map(). Please do correct me if i am wrong.I think this is the longest read time I ever see on the internet. Thank you for the article. I'd bookmark for future references.
Thank you for the effort.
EDIT: In Question 5 you wrote:
Did you intend to use the word Imagine instead of Image?
actually Implement the
Array.prototype.map
is not too precise for what really wanted to be implemented.Great content! My name is Kairat, I'm a freelance self tough js developer. I'm planning to get a job as a Front end developer instead of freelancing.
Question: This article is very helpful for my theoretical knowledge. I'm just curious will I use these terms in my daily job? Seems like preparation for the exam and I will not use this knowledge in work. Or use very rarely.
Thank you a lot. This article helped me once. You have a good style! What about react hooks? especially custom ones? I would like to read one written by You. thank you. And as we discussed already the typescript for react. Because, I think - TS and TSX are in great demand now.
I think there're a mistake here...!
Isn't this invalid syntax...?
It should be:
Thanks man, I totally miss that one, hahaha
Great article!
Can I translate it into Korean and post it on my blog?
I'll clarify the source.
No Problem man and Thanks 😃!
Hey Mark ! Thank u so much for the wonderful blog ! I wanted to share that as of 17th March 2023 00:10 am IST my comment is the 100th one on this blog . Keep enlightening us with your knowledge like this in the future .
This a beast. Thank you.
The longest. I did not expect the answers at the bottom after the questions.You put in a lot of work here. bigUps.
I am gonna go through every aspect of and concept of the questions you put up. Thank you.
This should help me rank up my abilities.
Question #26
Probably here should be querySelectorAll instead of querySelector🙂
Thanks 😁, my bad.
Hoisting
let and const are hoisted in a different scope but they are in the temporal dead zone. That's why they throw the error 'let variable cannot be accessed before declaration'
Nice list, my favorite one is what is hoisting :)
Thanks, yea Hoisting is pretty fun to learn
Thanks man! Glad you like it 😁
Well done, it is helpful
Thanks 😁
I like this article, quite the refresher.
However, I think people forget quite a bit about the method bind that can do partially applied function! And it's not mentioned here.
Thanks!
Thanks Mark - great cheat sheet! Btw, what does your dog think of the article?
Great article. Great article !!!!
Thanks 😁😁😁
Awesome, well done mate!
Thanks mate! 😁
I need to brush up on my JS so this will be super helpful for me! Thank you!
Glad you like it 😁
Very detailed answers
Thanks man!
Thank you for the great article. It must be mistake in 1 question when you provide example of casting null and undefined to Boolean, you cast only null in both cases.
Thanks man for pointing that one out.
This is a gem, thanks for writing this!
Awesome article! I think that there is an error on the 3rd example of the Set object comments. It should say K and Z instead of "a". Look like a copy paste from the 4th example
Thanks man for pointing that one out hahaha
This is great stuff
Thanks 😃!
Thank you for the time and the passion you have spent for this article. It is awesome!
Thanks man, I just put all the things that I learned for the past two years, still I feel dumb with JavaScript
Great article. Well written 👍
Thanks
Great work!
Thanks! Glad you like it 😁
Great article!!
Can I translate this awesome article into a Japanese version to share if you let me do?
Thank you!
No problem man! And Thanks.
Great list! Thank you for the efforts and time you took to collect them.💙💙
Thank you :)
hi sir salamat sa post, timing nag hahanap pa naman ako ng work ngayon, bale unang web dev job ko
what an amazing post...
No problem man, and btw Thanks 😁
Did you guys notice how the closures concept is working in the "Implement a memoization helper function" question?
BTW, nice set of questions.
Thanks Mark for this beautiful compilation!
Biggest takeaway for me is the memoization technique. This has surely prompted me to make most of this feature. Thanks buddy for sharing this !!!
This was so helpful! Thank you so much!
for the case 59:
let obj = { prop: undefined }
the third method will not work with this object.
Hi, yes It will not work because you're setting the value of that property as 'undefined ' value.
Good job!!! 👏
Bro thanks for this post it really helped to gain knowledge in Javascript :)
Excellent article, thanks for sharing! <3
I have read from youtube : namaste js and mdn docs too. Let and const are hoisted, but they console to error(which is different thing). Imp thing is : let and const are HOISTED too
Hey. I've translated this post into Persian. I want to thank you a lot!
Here is the link to the post:
ditty.ir/posts/70-javascript-inter...
Thank you for writing this for us. However, could you explain the #62 answer a little bit more explicitly? Thanks again.
Thank you very much for the insight Mark ;D!!!
Thanks, Glad you like it. 😃
Thank you so much for creating this article, helped me a lot during my interview :)
This is so cool, thanks for sharing!