JavaScript for front-end interview preparation

Source: Internet
Author: User
Tags javascript eval

1. Data type,

There are 5 simple data types (also known as basic data types) in javascript: Undefined, Null, Boolean, number, and string. There are 1 more complex data types--object,object essentially consist of a set of unordered name-value pairs.

2. Object-oriented,

JavaScript is a thorough object-oriented language.

To illustrate that JavaScript is a thoroughly object-oriented language, it is necessary to start with object-oriented concepts and explore some of the concepts in object-oriented:

1) The object of all things

2) object has encapsulation and inheritance characteristics

3) Use message communication between objects and objects, each of which has information hiding

The JavaScript language implements object-oriented programming in a way called prototypes (prototype). There are two ways to implement object-oriented programming: Class-based (class-based) object-oriented and prototype-based (prototype-based) object-oriented.

3. Inheritance

The JavaScript language implements inheritance in a way called prototypes (prototype).

4. Closures

Closures are functions that have access to variables of another function scope, and the common way to create closures is to create another function inside one function

5. Plugins

The purpose of the plugin is to implement a range of functions. Generally, it is divided into two types, one is a standalone plug-in, and one is a dependency plugin. Independent plug-in words, as long as the plug-in written in a JS file, the introduction of JS can be. Depending on the plug-in, it is necessary to rely on other JS, such as the common JQ plug-in, the need to rely on JQ, the use of the first to introduce JQ, and then the introduction of this JS.

JS plug-in development requires several points of attention:

1) Independent variables, methods. Prevent conflicts with other JS, generally using closures.

2) Exposure settings, exposing method calls. For plugins to make some changes to the settings as needed.

3) To prevent duplication of definitions, there is a general initialization, it is recommended to use the anonymous function implementation can only be initialized once.

6. Scope

Scope is the accessible scope of variables and functions, that is, scope controls the visibility and life cycle of variables and functions. In JavaScript, the scope of a variable has both global scope and local scope.

7. Cross-domain

Simply understand is because of JavaScript homologous policy limitations, a.com domain name JS can not operate B.Com or c.a.com the object under the domain name.

8. Prototype chain

9. Modular

10. Custom Events

11. Memory leaks

12. Event mechanism

13. Asynchronous Mount Callbacks

14. Template Engine

15.Nodejs

node. JS is a set of JavaScript toolkits for writing high-performance Web servers.

16.JSON

JSON (JavaScript Object Notation) is a lightweight data interchange format that we call JavaScript Object notation. One of the advantages of using JSON for data transfer is that JSON is actually JavaScript. It is based on a text format of a subset of JavaScript object literal syntax in ECMAScript version 3rd. This means that you can use ResponseText to retrieve the JSON data from the server, and then use the JavaScript eval () method to convert the JSON string to a JavaScript object, With additional JavaScript, you can quickly extract data from the object without having to process the DOM.

17.ajax

Ajax is "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), i.e. no flush data read.

18.http Request:

The first thing you need to know about HTTP request methods (GET and POST).

Get is used to get data. GET is the delivery of data in the URL, which has low security and low capacity.

POST is used to upload data. POST security in general, almost unlimited capacity.

JavaScript for front-end interview preparation

Related Article

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.