Skip to Main Content
JavaScript and Open Data
book

JavaScript and Open Data

by Robert Jeansoulin
August 2018
Intermediate to advanced content levelIntermediate to advanced
272 pages
5h 3m
English
Wiley-ISTE
Content preview from JavaScript and Open Data

7From Signs to Patterns

This chapter gathers several notions about the signs and words used in JavaScript, how they interact with the syntax (the traps of polymorphism), how to use programming constraints to style a more readable and robust code and a few hints about meta-programming.

In any language, punctuation plays a role in the interpretation. It is reported in 1327 that Queen Isabella signed the following order about her husband, Edward II:

Edwardum occidere nolite // "do not execute Edward"
timere bonum est. // "to fear is a good thing"

and it is reported that a comma was added (by who?), after ‘timere’:

Edwardum occidere nolite // in a single line, read:
timere, bonum est. //"do not fear to execute Edward, it’s good"

In any language there are reserved words, sacred or forbidden, and you must replace them: e.g. American “my gosh”, instead of a forbidden word.

In any language there are pronouns, a grammatical form referring to another form, and whenever referencing, ambiguities may occur:

“because of the rain, Paul arrived late at the dentist. He was unhappy”

Who was unhappy? The dentist or Paul?

Ambiguity does not exist in computers, but “errare humanum est”. A human mistake can lead to misinterpretation. Keywords, punctuation and a misused pronoun are often error prone in JavaScript. This chapter is meant to guard you against such mistakes, and also meant to teach some programming best practices: design patterns.

7.1. Reserved words

The table below contains ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Wrangling with JavaScript

Data Wrangling with JavaScript

Ashley Davis
Web Applications with Javascript or Java

Web Applications with Javascript or Java

Gerd Wagner, Mircea Diaconescu

Publisher Resources

ISBN: 9781786302045