Brother you are one of the most efficient teachers for teaching programming on youtube that i could find.You explain concepts really well.Its sad that youtube is doing this to constructive youtubers like you.You have all my support!
This question with "returning total number of arguments" can be solved in much simpler way. const x = function(){ return arguments.length; } The object 'arguments' has property ''length'.
For getting total number of arguments, in ES6 we can do let x = function (...args) { return args.length; } and for the method chaining we can use return this;
This is great, I have a couple of job interviews next week for JavaScript roles and you have really helped me to build my confidence in preparation for this. Please keep posting videos :-)
What a fantastic videos. I remember watching your one year ago it feel like nostalgia, because i spend hours and hours watching your videos, trying to understand things. For now, i did not find better one tutorials on JS stuff on youtube at least. Just fantastic.
@17.25, a more concise solution is: const x = (...rest) => rest.length; Awesome video, Techsith. I'm 100% subbed 🏆🎊. Most of these questions really had be thinking haha
Hi, For simplicity of typing I have used iife... Why you have done like this ? any benefit? (function x (a , b, c, d) { return [].slice.call(arguments).length; })(1, 2, 3, 4); Instead of simply returning length of arguments array like- (function y (a , b, c, d) { return arguments.length; })(1, 2, 3, 4); Thanks, Rahul
Thank you so much for this. It's interesting to hear your perspective on these tricky questions and I appreciate your openness and honesty about youtube monetization
question : function return total number of arguments. // do not use loops. let x = function(){ return [].slice.call(arguments).length; } Below one is more simple : let x = function(){ return arguments.length; }
I'm studying my interview with your videos. If I pass, I will edit my comment and I hope it's going to be well because the videos are very great. The contents are preparing the audience to the tricky and hard questions. Especially the ones that include mock interviews. Keep it going!
I am already subscribed to your channel and I get alerts but I wanted to let you know that I really appreciate your content thank you for making videos and posting them for us!
Appreciate & yes maximum people make a list of questions to ask from the internet for the interviews & then start expecting the answers for those questions from candidates & in reality maximum interviewers also dont have any freaking idea for those answers. But current interviews have become a race, a questions/answers session, a Viva.
This video is great but and your explanation is good. I really did't understand the concept of asking these kind of questions in interview. Until and unless you faced these kind of scenarios in real time you never know the answer. I do have some decent experience like 6+ in JS but I faced these situations very rare when we work on framework. (9 out of 10 developers dont remember things after fixing an issue) So if some one answered these kind of questions means they saw these videos(assume {some number} out of 10) or read somewhere. So what are you interviewing real time experience or some interview preparation ? As an interviewer I will ask concepts(not these tongue twisters). architecture of application/framework and mainly approach on solving problem and wiling to learn.
Plg send me the question I don't have idea I prepared the interview my email id kamalrajawat870@gmail.com I have prepared in web development plg text all questions
Hi Sir, Your javascript interview part of videos are very helpful. actually I have found an another way in that question of function return total number arguments you have explained like function x(){ return [].slice.call(argunments).length; } x(1,2) // 2 length Found another way is arguments is a array like object it has number of array of arguments of function function x(){ return arguments.length; } x(1,2,3) // 3 simply we return arguments.length that will give lenght of arguments of function am getting answer for this way too.. Thanks once again sir.
Its important to know these questions. Most of the times people wont ask such questions but you might one or two people who would ask such silly questions to throw you off.
about function returns total number of arguments: Isn't it easier doing something like the following? Thanks! let x = function(){ return arguments.length; }
For the second last question, why would you do that way even though the following simply works fine? let x = function(){ return arguments.length; } x(1,2,3); // returns 3 Just quickly tested in jsfiddle
Thanks for your videos, they are really helpful. For the question related to number of arguments ...i could simply also do the below var y = function() { console.log(arguments.length); }; y(1,2,3,4,5); Any specific reason for using [].splice ......
What is your opinion on return this object instead of returning main object? Is there are any relation of this with closure? - var A = {x: function(){console.log('x'); return this;},y: function(){console.log('y'); return this;},z: function(){console.log('z'); return this;}}
This one is important for JS developers.
Thanks for watching ! :) Thanks for the support ! )
Very helpful, your you defeated the Google beast
5 years later and this video is still relevant. I didn’t watch it fully this time… but I do remember everything about it vividly. An absolute classic❤
Brother you are one of the most efficient teachers for teaching programming on youtube that i could find.You explain concepts really well.Its sad that youtube is doing this to constructive youtubers like you.You have all my support!
This question with "returning total number of arguments" can be solved in much simpler way.
const x = function(){
return arguments.length;
}
The object 'arguments' has property ''length'.
You are either wrong or you mean the opposite.
the below returns 4
function x(a,r,t){
return arguments.length;
}
console.log(x(5,5,6,7))
you can count formal parameters (aka "required arguments") with function.length, not arguments.length, which is a count of what's passed.
I was thinking the same thing, but also what's the point of no loops? How would a loop even help solve this problem lol.
output will be 4
x(.....) function will return how many arguments you are passing while calling x(....).
"This is an INTERVIEW, not a RACE" -techsith ☝️
For getting total number of arguments, in ES6 we can do
let x = function (...args) {
return args.length;
}
and for the method chaining we can use
return this;
To print the length of arguments (17:33), we can simply write:
return arguments.length;
inside the function instead of using Slice method.
That is true Arjun. Slice helps to convert argument to an array and then you can use other array features like join() and things.
This is great, I have a couple of job interviews next week for JavaScript roles and you have really helped me to build my confidence in preparation for this. Please keep posting videos :-)
There is no inappropriate content in this video, dear RUclips
What a fantastic videos. I remember watching your one year ago it feel like nostalgia, because i spend hours and hours watching your videos, trying to understand things. For now, i did not find better one tutorials on JS stuff on youtube at least. Just fantastic.
Thanks for watching and welcome back !
Getting ready for my first interview, your content is really helpful
Good luck with your interview. !
I am following you since couple of months.. You are champ man. Keep it up.. 1000 likes from my side
Hi Subrat, thanks for watching! :)
Very interesting JavaScript question! Thank you for sharing!! Thank you for taking time and effort to make so many nice JavaScript videos!
Thank you for helping strangers! I hope RUclips does right by you and you can keep the videos coming. They're a great help.
I've been watching your videos over the past few days and they've been extremely helpful and informative!
Thanks for watching Ninti! :)
I'm finding all your interview videos helpful. I have my first ever on Monday and feel much more confident going in.
Love those tricky questions, we actually keep learning :)
Great video, very useful
RUclips's algorithm is so stupid. Your videos are good quality and don't deserve to be demonitized.
Thanks for the support Kyle! :)
I learned new things. Thank you clearing my Concept 😇
Your all videos so far I have been seen are really deserves thumbs up ( 👍 ), Please keep doing your good work... and hope RUclips should not harm you.
Thanks for tricky question - didn't aware of this magic
You helped me a lot in job interviews.
Actually I am preparing for an interview right now with the help of your video.
Thank you!
my first javascript interview coming up very soon
Good luck!
6:10
That's a cool trick to impress your co-workers,
If they dont know it 😂😂
Best Interview series!
The reason you cited why the interviewer asks such weird questions are all very correct.
Please keep up the awesomeness.
Thanks for your work.
console.log(arguments.length);
vs
console.log([].slice.call(arguments).length);
Awesome tutorials man.
Jake Kim
Hi
@17.25, a more concise solution is: const x = (...rest) => rest.length;
Awesome video, Techsith. I'm 100% subbed 🏆🎊. Most of these questions really had be thinking haha
Nice video, keep up the good work! (:
Thanks for the support ! )
Nice tricky questions. These are proper genuine content videos.
Great interview questions 👍🏻
Thanks for watching ! :)
Wonderful to learn this. Thank you
This is one of the best channel to advance your JavaScript.
Thanks! Great video!
Hope RUclips will change its policy, keep it up please)
Thanks for the support ! )
What a great video. I had my hand over my head all the way. Like I would literally fail all the questions without your solutions. Thank you so much.
Hi,
For simplicity of typing I have used iife...
Why you have done like this ? any benefit?
(function x (a , b, c, d) {
return [].slice.call(arguments).length;
})(1, 2, 3, 4);
Instead of simply returning length of arguments array like-
(function y (a , b, c, d) {
return arguments.length;
})(1, 2, 3, 4);
Thanks,
Rahul
Thank you so much for this. It's interesting to hear your perspective on these tricky questions and I appreciate your openness and honesty about youtube monetization
Glad it was helpful!
Thank you so much for this video! I hope this channel grows even larger!
Thanks for your support Fikayoz!
Dude I love the videos you're really helping me and many others on our Dev path
Best RUclips channel for JavaScript interview
Awesome man. Want to see more interview tricky question series. Awesome job.
Thanks for the video. We all support you for all the hard work you are doing!
Thanks for your support! :)
im glad you fixe YT problems for ads...your videos eally helpme a lot thanks👏
@3:26 now I fully understand how styled components work. You are such a good teacher
This is very helpful. I am conducting JavaScript interviews in the next couple weeks. This has been a great resource (along with your other videos).
Thank you for watching Ryan. Good luck with your interviews!
your videos are awesome and RUclips is very discouraging. Keep up the good work sir.
Techsith videos have been very useful to me. Thank you.
That thing with contentEditable blew me away! Awesome trick!
Amazing! The String constructor one was cool haha
Great content!! I am preparing for an interview in a couple days and your videos are a huge help!!
I am glad Adam . thanks for watching!
Really helpful video! We need more of those on RUclips!
I have a plan for more such videos. keep an eye on the channel for that.
question : function return total number of arguments. // do not use loops.
let x = function(){
return [].slice.call(arguments).length;
}
Below one is more simple :
let x = function(){
return arguments.length;
}
I'm studying my interview with your videos. If I pass, I will edit my comment and I hope it's going to be well because the videos are very great. The contents are preparing the audience to the tricky and hard questions. Especially the ones that include mock interviews. Keep it going!
Hey did u selected or not
I am already subscribed to your channel and I get alerts but I wanted to let you know that I really appreciate your content thank you for making videos and posting them for us!
Ernest , Thanks you for watching! :)
Super helpful video while Im studying for a job interview
Appreciate & yes maximum people make a list of questions to ask from the internet for the interviews & then start expecting the answers for those questions from candidates & in reality maximum interviewers also dont have any freaking idea for those answers. But current interviews have become a race, a questions/answers session, a Viva.
Thankful for good bunch of Interview questions ons JS.
You're awesome, your videos are helping me a lot. If I pass my interview tomorrow I'll become a patreon. Thank you very much!
Good luck with your interview Andrea. :)
function a() {
console.log(arguments.length);
}
Above will also work for arguments length.
Really like this tricky interview questions series. Keep posting it
This video is great but and your explanation is good.
I really did't understand the concept of asking these kind of questions in interview. Until and unless you faced these kind of scenarios in real time you never know the answer. I do have some decent experience like 6+ in JS but I faced these situations very rare when we work on framework. (9 out of 10 developers dont remember things after fixing an issue)
So if some one answered these kind of questions means they saw these videos(assume {some number} out of 10) or read somewhere. So what are you interviewing real time experience or some interview preparation ?
As an interviewer I will ask concepts(not these tongue twisters). architecture of application/framework and mainly approach on solving problem and wiling to learn.
Thank you. I have my interview tomorrow and if I pass it, it thanks to you.
Did you pass?
Plg send me the question I don't have idea I prepared the interview my email id kamalrajawat870@gmail.com I have prepared in web development plg text all questions
Hi Sir, Your javascript interview part of videos are very helpful. actually I have found an another way in that question of function return total number arguments
you have explained like
function x(){
return [].slice.call(argunments).length;
}
x(1,2) // 2 length
Found another way is
arguments is a array like object
it has number of array of arguments of function
function x(){
return arguments.length;
}
x(1,2,3) // 3
simply we return arguments.length that will give lenght of arguments of function
am getting answer for this way too..
Thanks once again sir.
Thanks for the tips! I hope I am not running into any of the questions in my interviews, but it is so good to know.
Its important to know these questions. Most of the times people wont ask such questions but you might one or two people who would ask such silly questions to throw you off.
You are really driving up my love/hate relationship with JavaScript.
I did not know about the contenteditable attribute!! It's awesome
about function returns total number of arguments: Isn't it easier doing something like the following? Thanks!
let x = function(){
return arguments.length;
}
Thanks for making this video which helps me understand tricky concepts of JavaScript. Thanks a bunch
Thanks for your videos, they are always so helpful. Learned some great things from this one !!
Please come up with more videos of this type. It would be very helpful for interviews. Thanks
I have a whole series of such videos. do check it out the playlist
Excellent Video. We support you and we need more educational video from you.
Thanks for watching Shridhar!
u have gr8 knowledge on Javascript. I am learning a lot from u. I am looking forward for more technical videos from u.
I am a new subscriber, and I can tell you that I love your content and videos... It is awesome!!! keep up the great work :)
Grear video! Always putting out worthwhile content😁
Excellent video!, I didn't knew about content editable property until now. Thanks!
yes, its a neat trick.:)
Come on youtube this is an educational channel, please remove restrictions.
Awesome Video! A fun way to practice JS for coding interviews
Thanks a lot for this video, you are really unique with this content!
we can get the total number of argument simply using arguments.length right?
let x = function(){
return arguments.length;
}
console.log(x(1,2,3,4,5))
5 years later still a great content ✨
The way you explain the JavaScript are really awesome.
Glad you think so! Thanks for watching!
seriously very much needed video for developers
Thank you shweta for a nice comment! :)
Very nice and useful one. Techsith really helping the community...
techsith, your videos are amazing!
Good video to understand JavaScript concepts in depth
For the second last question, why would you do that way even though the following simply works fine?
let x = function(){
return arguments.length;
}
x(1,2,3);
// returns 3
Just quickly tested in jsfiddle
yes. that would be a valid answer as well.
found tutorial very useful. Learnt new things in JS. Thank you.
Thanks for your videos, they are really helpful.
For the question related to number of arguments ...i could simply also do the below
var y = function() {
console.log(arguments.length);
};
y(1,2,3,4,5);
Any specific reason for using [].splice ......
yes you could simply use arguments.length
Great video to learn JS tricky interview questions. I felt thrill waiting for each answer of a question
This was a very informative video. Thank you for creating it! I'll be sharing this with some of my programmer friends :)
Where are you right now? Did you land at your first job? I am having an interview today.
I really like this series! I learnt a lot from watching these. Thank you!
Thanks for watching Yiying! :)
for the one with the total arguments, we can also use a simple 'return arguments.length'
I'm grateful for all the effort you are putting in which makes learning so much easier. Thanks for all the hardwork
Thanks for watching Grourav. I am gladthat it helped!
Thanks for making this video. Its a great help for guys like us.
Sufiyan, thanks for the comment.
This video is so important and you have shared very good questions with valid answers. Thanks a lot
What is your opinion on return this object instead of returning main object? Is there are any relation of this with closure? - var A = {x: function(){console.log('x'); return this;},y: function(){console.log('y'); return this;},z: function(){console.log('z'); return this;}}
I am just thankful to you from heart for these videos.
Your content is great and very informative.
Keep up the good work!
'Document.body.cotentEditable = "true" ' is super cool !!!
Yes first time i saw contentEditable I was blown away. :)