JavaScript: The Definitive Guide, Sixth Edition by David Flanagan

As explained above, the following two JavaScript expressions have the same value:object.propertyobject["property"].The first syntax, using the dot and an identifier, is like the syntax used to access a staticfield of a struct or object in C or Java. The second syntax, using square brackets and astring, looks like array access, but to an array indexed by strings rather than by numbers.This kind of array is known as an associative array (or hash or map or dictionary).JavaScript objects are associative arrays, and this section explains why that is important.In C, C++, Java, and similar strongly typed languages, an object can have only a fixednumber of properties, and the names of these properties must be defined in advance.Since JavaScript is a loosely typed language, this rule does not apply: a program cancreate any number of properties in any object. When you use the . operator to accessa 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.

120|Chapter 6:Objects

a loosely strongly typed language的更多相关文章

  1. Dynamic V Strongly Typed Views

    Come From https://blogs.msdn.microsoft.com/rickandy/2011/01/28/dynamic-v-strongly-typed-views/ There ...

  2. MVC 5 Strongly Typed Views(强类型视图)

    学习MVC这样久以来,发觉网站上很多MVC的视频或是文章,均是使用Strongly Type views来实现控制器与视图的交互.Insus.NET以前发布的博文中,也大量使用这种方式: <Da ...

  3. Delphi Language Overview

    Delphi is a high-level, compiled, strongly typed language that supports structured and object-orient ...

  4. New需谨慎

    New is Glue When you’re working in a strongly typed language like C# or Visual Basic, instantiating ...

  5. 数据库设计(1/9):数据元(Data Elements)

    对于设计和创建数据库完全是个新手?没关系,Joe Celko,世界上读者数量最多的SQL作者之一,会告诉你这些基础.和往常一样,即使是最专业的数据库老手,也会给他们带来惊喜.Joe是DMBS杂志是多年 ...

  6. Core Java Volume I — 3.3. Data Types

    3.3. Data TypesJava is a strongly typed language(强类型语音). This means that every variable must have a ...

  7. Delphi XE5教程1:语言概述

    内容源自Delphi XE5 UPDATE 2官方帮助<Delphi Reference>,本人水平有限,欢迎各位高人修正相关错误! 也欢迎各位加入到Delphi学习资料汉化中来,有兴趣者 ...

  8. Quest for sane signals in Qt - step 1 (hand coding a Q_OBJECT)

    探索qt的信号ref: http://crazyeddiecpp.blogspot.hk/2011/01/quest-for-sane-signals-in-qt-step-1.html If it ...

  9. STL之父Stepanov谈泛型编程的发展史

    这是一篇Dr. Dobb's Journal对STL之父stepanov的采访.文中数次提到STL的基本思想.语言的特性.编程的一些根本问题等,非常精彩.这篇文章让我想去拜读下stepanov的大作& ...

随机推荐

  1. 【代码审计】CmsEasy_v5.7 代码执行漏洞分析

      0x00 环境准备 CmsEasy官网:http://www.cmseasy.cn/ 网站源码版本:CmsEasy_v5.7_UTF8-0208 程序源码下载: http://ftp.cmseas ...

  2. Synchronizing Threads and GUI in Delphi application

    Synchronizing Threads and GUI   See More About delphi multithreading tthread class user interface de ...

  3. 与MQ通讯的完整JAVA程序

    该程序实现了发送消息与读取消息的功能,见其中的 send***与get***方法.这只适合于测试,因为环境中的程序还需要对此有稍微的更改,在真实的环境中肯定是在while(true){...} 的无限 ...

  4. 为啥RESTFULL如此重要?

    为啥RESTFULL如此重要? 2014-6-3 20:13| 发布者: admin| 查看: 57| 评论: 0|来自: java365 摘要: 本文我们将讨论REST,它定义了一组体系架构原则,您 ...

  5. ie11中报SCRIPT1003: 缺少 ':'的错误?

    兼容性?IE的兼容性…… 由于“叶叶综合征发作”,导致有段时间都在自我否定中,故而引发一系列的不美好.幸好,自己还有超强的恢复能力,一切都在往好的方向发展吧. 直接进入 “可怕的IE兼容”主题: 第一 ...

  6. StarUML2 建模工具全平台破解及license验证简要分析

    破解方法:找到安装目录下的文件:LicenseManagerDomain.js阅读得知,改软件用rsa加密用户信息,换行为用户信息的分隔符修改以下代码,然后打开软件点击菜单栏中的帮助->输入li ...

  7. Tomorrow Is A New Day

    Sometimes we do not feel like we want to feel     Sometimes we do not achieve what we want to achiev ...

  8. junit4 详解

    转:http://www.cnblogs.com/eggbucket/archive/2012/02/02/2335697.html JUnit4概述 JUnit4是JUnit框架有史以来的最大改进, ...

  9. Android6.0中PowerManagerService分析

    转自:http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=30510400&id=5569393 概述 一直以来,电源管理是 ...

  10. 重建索引:ALTER INDEX..REBUILD ONLINE vs ALTER INDEX..REBUILD

    什么时候需要重建索引 1. 删除的空间没有重用,导致 索引出现碎片 2. 删除大量的表数据后,空间没有重用,导致 索引"虚高" 3.索引的 clustering_facto 和表不 ...