minor fixes

This commit is contained in:
Ilya Kantor 2022-08-14 15:26:02 +03:00
parent cbd7d7831c
commit 72aa4f0b97
2 changed files with 3 additions and 1 deletions

View file

@ -445,6 +445,8 @@ There are 3 methods in JavaScript to get a substring: `substring`, `substr` and
alert( str.substr(-4, 2) ); // 'gi', from the 4th position get 2 characters
```
This method resides in the [Annex B](https://tc39.es/ecma262/#sec-string.prototype.substr) of the language specification. It means that only browser-hosted Javascript engines should support it, and it's not recommended to use it. In practice, it's supported everywhere.
Let's recap these methods to avoid any confusion:
| method | selects... | negatives |