Giter Site home page Giter Site logo

补充下圆括号的语法 about jstutorial HOT 3 CLOSED

jetiny avatar jetiny commented on August 20, 2024
补充下圆括号的语法

from jstutorial.

Comments (3)

 avatar commented on August 20, 2024

请问这个说法的出处在哪里?以下为括号算符的说明:

http://www.ecma-international.org/ecma-262/5.1/#sec-11.1.6

返回最后一个值则是逗号算符的功能,与括号无关,除非它在参数列表中。

from jstutorial.

ThomasHuke avatar ThomasHuke commented on August 20, 2024

这个iss提的完全没有水准,这些问题纯粹是优先级的问题,并且我认为在编程中应该避免这种一眼看不出来编程意向的方式,使用规范的方式。使用 var a = ( a1++, b1++ ) ,看起来真的很丑陋。另外加上括号是为了让逗号运算符的起作用优先于 赋值运算符,所以才加上括号这个优先级最高的符号的。

from jstutorial.

ruanyf avatar ruanyf commented on August 20, 2024

圆括号没有匿名函数的作用。

from jstutorial.

Related Issues (20)

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.