Hard JavaScript Interview Questions and their possible answers ( cracking difficult coding interview questions )
Article and code samples from this tutorial
* techsith.com
Please be my patreons on patreaon
* https://www.patreon.com/techsith
Follow me for technology updates
* https://facebook.com/techsith
* https://twitter.com/techsith1
Help me translate this video.
* http://www.youtube.com/timedtext_video?ref=share&v=qsNxdukPc2U
Note: use https://translate.google.com/ to translate this video to your language. Let me know once you do that so i can give you credit. Thank you in advance.
Original source
28 responses to “Tricky JavaScript Interview Questions and Answers”
i appreciate ur effort
I used :
let profile = {
name: "vivek",
};
Object.defineProperty(profile, 'age',{
value: 3,
writable: false
});
profile.name = "Amol";
profile.age = 20;
console.log(profile);
0/p => [object Object] {
name: "Amol"
}
why it is so?
I known about "IIFE" but i was unable to think use it here. Sometimes it goes this way i could not think likewise so can you please suggest me, how can i improve myself ?
The unique values in new array can be achieved by Set object and spread operator as following,
const numbers = [1,2,2,3];
let uniqueNumArr = [… new Set(numbers)];
console.log("Unique Array : ", uniqueNumArr);
as "+" behaves as concatenate operator in first console JavaScript automatically converts int 2 to string and concatenate to result into = 22. While in second console log "-" acts as subtraction operator and converts string to integer and results to = 0.
his accent and voice suckss… even though his ideas are great… why do he even change and talk… yaaak.. cant even listen more than 5min…. rather i would stop going for an interview….
Let num[1,2,3,4]
So you have a string
Wowww
That IIFE solution doesnt work for me hmm
I would think that Math.max() should give 0
Great videos, may i now what is online tool you use on videos for writing the code.
bhaiya tumko hindi nhi aati kya
1:45 sorry its not "concatetion" but its concatenation !
My god. nice awsome
I don't understand why there're so many haters… Those are actually good and valid tricky questions. Btw sir, you mentioned that you have another channel that teaches algorithm and data structures, where is the link?
super explanatio
Hi Its great thanks for teaching too instead of only giving the answers, You are letting us think, Great thanks for the videos. And if you have video on spread operator do let me know I was asked this in one of my Interview I have an obj ={ name :" likitha",age : 30 } if you want to change the name property alone to be modified ,you can use spread operator { name: "lohitha" ,…obj} ->this is the answer anyways -> {name : "likitha"} ,but I had no idea of how spread can work in different ways how do they come up with this , I know the spread operator but I am not aware of this option ..,Please do let me know..
Not sure I understand why it would compare to -Infinity. It seems like it should see the length of arguments and return the first one if there's just one. If there are more, it should start comparing them to each other. Not sure how -Infinity logic comes into play. If you pass nothing, I'd actually expect it to return Infinity, not the opposite. I'm not sure if the way it works is based off how you do things in math or just a base assumption made by JavaScript authors.
tysm sir , amazing video
Buy a new camara please
This video is very helpful
Hii sir can you please make video's
on JSON data
accent is fishy
Awesome explanation along with very logical and technical approach.
excellent
This site is very helpful you can get professionals to guide you
https://stude.co/437677
hope it help
Thank u soo much sir The way you explain all the questions is 1337(elite)
It was amazing, thank you
Hi,
I found your videos are quite impressive and very informative. I would like to inform you to get connected to our site, where you can explore your ideas and help students with their projects, homework and assignments at https://www.edubow.com/ and earn money as well. Looking forward to your response.