The closed space of JS

Source: Internet
Author: User

1.JS is a messy language, but also his mother's graceful, elegant

In order to solve the conflict, made a closed space, listening to a very high-end, others java,php have a namespace, js you hooves, make a closed space is great

Even jquery writes like this.

2. wording

# () ();

(function ()) ();

3# (function () {

Alert (' SB will stay in the closed space to play! ');

})();

That makes SB think of it. Eval parsing a JSON-formatted string

var json= "{...}"

# eval ("" ");

* Eval ("+ +");

3# eval ("(" +json+ ")");

This converts the JSON string format into a JS JSON object.

3. It is very simple to write a play, is just contact when writing awkward, can't stand, to die!

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.