Code Monkey home page Code Monkey logo

jsinterviewquestions's Introduction

JSInterviewQuestions

var myObject = { foo: "bar", func: function() { var self = this; console.log("outer func:this.foo= " + this.foo); console.log("outer func:self.foo= " + self.foo); (function() { console.log("inner func: this.foo= " + this.foo); console.log("inner func: self.foo= " + self.foo); }()); } }; myObject.func();

console.log(1 + "2" + "2"); console.log(1 + +"2" + "2"); console.log(1 + -"1" + "2"); console.log(+"1" + "1" + "2"); console.log( "A" - "B" + "2"); console.log( "A" - "B" + 2);

var a = { 'id':3,'name':'s'} var b=a; b['id']=3; console.log(a); console.log(b); var x = 21; var girl = function () { console.log(x); var x = 20; }; girl (); var b = 1; function outer(){ var b = 2 function inner(){ b++; var b = 3; console.log(b) } inner(); } outer(); var hero = { _name: 'John Doe', getSecretIdentity: function (){ return this._name; } };

var stoleSecretIdentity = hero.getSecretIdentity;

console.log(stoleSecretIdentity()); console.log(hero.getSecretIdentity()); var list = readHugeList();

var nextListItem = function() { var item = list.pop();

if (item) {
    // process the list item...
    nextListItem();
}

}; var a=[1,2,3] a[10]=99; a[6]; a[4] https://medium.com/the-clever-dev/50-difficult-javascript-interview-questions-88e6e92367e7

jsinterviewquestions's People

Contributors

andx25 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.