zoukankan      html  css  js  c++  java
  • prototype linkage can reduce object initialization time and memory consumption

    //对象是可变的键控集合,

    //“numbers, strings, booleans (true and false), null, and undefined” 不是对象的解释

    The simple types of JavaScript are numbers, strings, booleans (true and false), null, and undefined. All other values are objects. Numbers, strings, and booleans are object-like in that they have methods, but they are immutable. Objects in JavaScript are mutable keyed collections. In JavaScript, arrays are objects, functions are objects, regular expressions are objects, and, of course, objects are objects.

     An object is a container of properties, where a property has a name and a value. A property name can be any string, including the empty string. A property value can be any JavaScript value except for undefined.

    Objects in JavaScript are class-free. There is no constraint on the names of new properties or on the values of properties. Objects are useful for collecting and organizing data. Objects can contain other objects, so they can easily represent tree or graph structures.

    //使用原形链来减少对象初始化时间和内存消耗

    JavaScript includes a prototype linkage feature that allows one object to inherit the properties of another. When used well, this can reduce object initialization time and memory consumption.

  • 相关阅读:
    STC15F2K60S2应用笔记
    2013春季求职第二面——珠海全志科技
    SAXReader解析XML文件
    利用socket实现java程序自动关闭
    java调用oracle存储过程
    spring定时任务的简单应用(转载)
    spring map注入的使用
    解析properties文件
    System.getProperty()参数大全
    JS正则表达式大全
  • 原文地址:https://www.cnblogs.com/rsapaper/p/5933414.html
Copyright © 2011-2022 走看看