Tricky JavaScript interview questions and answers
Video Statistics and Information
Channel: techsith
Views: 103,099
Rating: 4.9641228 out of 5
Keywords: javaScript, interview, interview questions, tutorial, java Script, techsith, techsithtube, techsith.com, lecture
Id: QCQVttjblRs
Channel Id: undefined
Length: 21min 0sec (1260 seconds)
Published: Mon Dec 04 2017
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
I'm glad that these questions aren't as common anymore. It's just programming trivia that never comes up in practice and doesn't test whether you are a good programmer or not. Serious recruiters don't use them, and you should not feel bad if all of this feels incomprehensible and pointless, because it is.
console.log({} + {}) giving me [object object] what is that? I have never seen that before.
I have no clue how to consider myself on a JS scale yet. Can we get a proven badass JS-er opinion on how much this test says about your JS skills compared to what you actually need to know to be good at a JS these days?
I just randomly clicked at the end and OP used a slice trick to get the length of the
arguments
Array-like object. It actually has a length property so you don't need the tricks.Edit* scrolling back to the x[x](01) part - A better explanation is it doesn't try to convert
01
to a string it converts01
first to a decimal number since it's an octal number (starting with 0) then it gets converted to a string.He didn't explain the prototype stuff well. For anyone confused:
The constructor functions are
String
andObject
, but it's their.prototype
property (functions are themselves objects, so they can have properties) that holds an object with all the methods/properties that'random string'
may inherit.This guy is great!