JavaScript的笔记(42)

>我来写笔记

按有用程度 按页码先后 最新笔记

  • prep

    prep

    We all find the good parts in the products that we use. We value simplicity, and when simplicity isn’t offered to us, we make it ourselves. My microwave oven has tons of features, but the only ones I use are cook and the clock. And setting the clock is a struggle. We cope with the complexity of feature-driven design by finding and sticking with the good parts. It would be nice if products and ...

    2019-04-03 02:19

  • 夏夜寂寞

    夏夜寂寞 (尽人事,听天命)

    We can generalize this by making a function that helps us make memoized functions. The memoizer function will take an initial memo array and the formula function. It returns a recur function that manages the memo store and that calls the formula function as needed. We pass the recur function and the function's parameters to the formula function: var memoizer = function (memo, formula) { var rec...

    2018-11-12 19:49

  • eve

    eve

    这本书也太可爱了叭,每章开头都引用一段莎士比亚。这一章是「Upon a homely object Love can wink」。

    2018-09-28 01:33

  • 夏夜寂寞

    夏夜寂寞 (尽人事,听天命)

    Unfortunately, JavaScript does not have block scope even though its block syntax suggests that it does. This confusion can be a source of errors. ES6的关键词let和const已经采用了block scope。

    2018-09-17 19:57

  • 夏夜寂寞

    夏夜寂寞 (尽人事,听天命)

    Some languages offer the tail recursion optimization. This means that if a function returns the result of invoking itself recursively, then the invocation is replaced with a loop, which can significantly speed things up. Unfortunately, JavaScript does not currently provide tail recursion optimization. ES6已支持tail recursion:http://2ality.com/2015/06/tail-call-optimization.html 但是ES6对该特性...

    2018-09-17 18:59

  • 夏夜寂寞

    夏夜寂寞 (尽人事,听天命)

    The prototype link is used only in retrieval. If we try to retrieve a property value from an object, and if the object lacks the property name, then JavaScript attempts to retrieve the property value from the prototype object. And if that object is lacking the property, then it goes to its prototype, and so on until the process finally bottoms out with Object.prototype. If the desired property ...

    2018-09-10 21:07

  • 夏夜寂寞

    夏夜寂寞 (尽人事,听天命)

    The quotes around a property's name in an object literal are optional if the name would be a legal JavaScript name and not a reserved word.

    2018-09-10 20:57

  • 夏夜寂寞

    夏夜寂寞 (尽人事,听天命)

    If a number literal has an exponent part, then the value of the literal is computed by multiplying the part before the e by 10 raised to the power of the part after the e. So 100 and 1e2 are the same number. 现在指数能用**符号表示。

    2018-09-10 15:18

  • 夏夜寂寞

    夏夜寂寞 (尽人事,听天命)

    A name is a letter optionally followed by one or more letters, digits, or underbars. A name cannot be one of these reserved words: abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends false final finally float for function goto if implements import in instanceof int interface long native new null package private protected pu...

    2018-09-10 15:11

  • 夏夜寂寞

    夏夜寂寞 (尽人事,听天命)

    The first is that you don't have a choice. The Web has become an important platform for application development, and JavaScript is the only language that is found in all browsers. It is unfortunate that Java failed in that environment; if it hadn't, there could be a choice for people desiring a strongly typed classical language. JS的生态环境已经变了很多,喜欢强类型语言的人可以用TypeScript(一种...

    2018-09-10 15:05

<前页 1 2 3 4 5 后页>

笔记是你写在书页留白边上的内容;是你阅读中的批注、摘抄及随感。

笔记必须是自己所写,不欢迎转载。摘抄原文的部分应该进行特殊标明。

JavaScript

>JavaScript