JavaScript Mock Interview | Online Interview Questions and Answers




Online Technical Mock Interview of one of my viewers. Where I ask JavaScript Fundamental Questions and give their answers.

If you like to be mock interviewed, email me at
* info@interviewnest.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.
*
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


50 responses to “JavaScript Mock Interview | Online Interview Questions and Answers”

  1. the last question wasn't asked right
    the code will give "1" as he said
    but this code will give undefined
    const obj = {

    x:1,

    getX(){

    const inner = function(){

    console.log(this.x)

    }

    inner();

    }

    }

    obj.getX();

    so there are four solutions you can do
    1- the code you have posted
    2- assign this to new variable before inner funtcion
    3- use inner.call(this)
    4-use inner.bind(this)

    greatings ๐Ÿ™‚ ๐Ÿ™‚

  2. Answer for the question in the video at 17:09 const a= function(x){
    this.x=x;
    this.getX=function(){
    return this.x;
    }
    }

    const b=function(x, y){
    a.call(this,x);
    this.y=y;
    this.getY=function(){
    return this.y;
    }
    }
    b.prototype=a.prototype;
    b.prototype.constructor=b.prototype.constructor;

    const newB = new b('x', 'y');
    console.log(newB.getX());
    console.log(newB.getY());

  3. About the solution given by this guy(One who is giving Interview) at 14:28 for [1,2].print() since i am new to ES6 so i tried his solution on browser but i am getting error at for..of "Uncaught TypeError: this is not iterable" how to access the arguments inside print function. By arguments i mean when i call print like you have called.

  4. Hi bro , I got offer letter from CTS yesterday, joining date as Oct 8 2018. I start to watch ur video tutorial last two days before interview. Really it helpful… Same questions I got in interview, thank you bro

Leave a Reply