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.

  • 相关阅读:
    数据库管理
    CodeSmith的运用正在完善中,待续
    各搜索引擎搜索代码
    浏览器本地存储
    QQ在线代码生成
    6组Alpha冲刺4/6
    结对编程作业
    camera相关
    数电、模电相关
    usb协议学习
  • 原文地址:https://www.cnblogs.com/rsapaper/p/5933414.html
Copyright © 2011-2022 走看看