Table of Contents

Javascript interview

Javascript

問答題

Reference: https://stackoverflow.com/questions/1684917/what-questions-should-a-javascript-programmer-be-able-to-answer

Why would this code not work as expected? Is anything missing?
  class User {
    constructor(name) {
      this.name = name;
    }
  }
Why do the anchors, when clicked on, alert -1 instead of their respective counter inside of the loop?

http://jsrun.net/QpbKp/edit

The difference is scoping. var is scoped to the nearest function block and let is scoped to the nearest enclosing block.

習作題

NodeJS

MongoDB

假设你要做一个图书管理系统。你会怎样设计 MongoDB document 以达到以下需求?

Framework