JS Interview Knowledge points

Source: Internet
Author: User

Prototype chain of Basic prototype

Scoped closures

Asynchronous single Thread

JS API DOM Operation

Ajax

Event Bindings

Development Environment Version Management

Modular

Packaging tools

Run Environment page rendering

Performance optimization

Interview questions

What types of typeof can be used in 1.JS?

Test centers:JS Variable type

    • What are the built-in functions in JS?
    • What types of JS variables are stored differently and describe their characteristics

value type memory addresses do not interfere with each other by assigning values

Reference type pointers save memory space can extend properties indefinitely

    • How to understand JSON

Knowledge point Variable type variable calculation

Variable type value type VS reference type ( object, array, function )

typeof operator Explanation

typeof undefined  //undefinedtypeof ' abc '   //stringtypeof 123  //numbertypeof true//booleantypeof {}// objecttypeof []  //objecttypeof null//object (null pointer, defines a position) typeof Console.log//function/*typeof can only differentiate between the detailed types of value types, There is nothing to do with reference types, can distinguish functions */

Built-in functions in/*JS--Data Encapsulation class object */objectarraybooleannumberstringfunctiondateregexperror
/* Built-in objects */
Math
Json

How to understand json//a data format, JSON is just a JS object only//2 apijson.stringify ({a:10,b:20}) Json.parse (' {"A": Ten, "B": 20} ')

2. When to use = =, when to use = = =?

Test Center: forced type conversion

/* = = = No type conversion */if (OBJ.A = = null) {/   *     Property exists for object
Here is equivalent to obj.a = = = NULL | | OBJ.A = = = Undefined, abbreviated form This is the jquery source code in the recommended wording */}

 Except for this, all others use = = = 

value types can occur when type conversion is calculated

    • string concatenation
    • = = operator
    • If statement
    • Logical operations
/* String stitching */var a = +  //110var b = + '  //10010/*== ' operator */100 = = '//true0 = = '  //truenull = Undefined  //true/*if statement */var A=tureif (a) {  //...  } var b=100if (b) {  //...  } var c= "if (c) {  //...  }
/*if () will turn to false in the concentration situation */
/*0 NaN ' null undefined false*//* logical operation */console.log (&& 0) //0console.log (' | | ' abc ') //abcconsole.log (!WINDOW.ABC) //true//determine if a variable will be treated as true or Falsevar a=100console.log (!!). A

  

The difference between 3.window.onload and domcontentloaded?

Test Center: Browser Rendering Process

4. Create 10 <a> tags with JS and pop up the corresponding serial number when clicked

Test centers: Scopes

5. Describe how to implement a module loader to achieve the basic functions like require.js

Test Center:JS Modular

6. Implementing random ordering of arrays

Test Center:JS Basic Algorithm

JS Interview Knowledge points

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.