zoukankan      html  css  js  c++  java
  • Javscript the definitive guide 6th edition 阅读随记

    6.2.1 Objects As Associative Arrays
    When you use the . operator to access
    a property of an object, however, the name of the property is expressed as an identifier.
    Identifiers must be typed literally into your JavaScript program; they are not a datatype,
    so they cannot be manipulated by the program.
    On the other hand, when you access a property of an object with the [] array notation,
    the name of the property is expressed as a string. Strings are JavaScript datatypes, so
    they can be manipulated and created while a program is running


    这里提到identifier 不是一种datatype,这里可能有些人感到迷惑,标识符是在语言被编译或解释的过程的前期(词法分析阶段完成的),而数据类型的确立基本是在中期(语义分析)了,所以明白这一点就好理解了。

    虽然js是动态语言,但是有些基本的编译规则我想应该也是共通的。

  • 相关阅读:
    js Array的方法及属性总结
    js 继承
    js 判断数据类型
    序列化和反序列化
    express 常用方法和插件
    node 常用的对象
    node.js 守护进程
    CentOS7安装Python3.8.1和ansible
    MAC终端终极美化方案
    Linux之top命令详解
  • 原文地址:https://www.cnblogs.com/argb/p/2151714.html
Copyright © 2011-2022 走看看