impatient-js icon indicating copy to clipboard operation
impatient-js copied to clipboard

Chapter: Strings

Open rauschma opened this issue 6 years ago • 4 comments

rauschma avatar Jun 26 '18 16:06 rauschma

Misformatting in subparts of 18.7.4 String.prototype: finding and matching: .indexOf(searchString: string, minIndex=0): number [ES1] and .lastIndexOf(searchString: string, maxIndex=Infinity): number [ES1]:

s

s2

vsemozhetbyt avatar Jul 20 '20 21:07 vsemozhetbyt

Section 20.7.1 has a minor error where it says:

A Unicode code point escape lets us specify a code point hexadecimally (1–5 digits). It produces one or two JavaScript characters.

> '\u{1F642}'
'🙂'

Note that Unicode code points extend to U+10FFFF and thus the number of digits can be 6 rather than 5, e.g. '\u{10FFFD}

aphillips avatar Jul 05 '22 15:07 aphillips

Each code point is 21 bits in size.

I (mildly) object to that. Bits relate to charset encodings. Code points are just abstract numbers (in the range 0 to 2^21-1), they are mathematical entities, not digital data. They are only denoted as hexadecimal to help distinguish the ranges (planes).

leonbloy avatar Jul 27 '22 19:07 leonbloy

In section 20.1.1, there is a sentence starting with "Convertings values to strings:" where the first word should be "Converting".

boblangford avatar Mar 28 '24 14:03 boblangford