Loading topic
let versus const, functions) and can run code in Node.js or a browser console. It also assumes you can create string literals, as covered in the previous chapter.2 min readfor loop, and run code in Node.js or a browser console. It also builds on the previous two chapters, which covered how to create strings and why they cannot be changed.2 min read ``) instead of quotes. It can contain embedded expressions and c2 min readindexOf and lastIndexOf return -1 when they find nothing.2 min readmap and filter, and that you have read the earlier chapters on trim and slice. Two methods let you move between strings and arrays. split breaks a string into an array of pieces, and join puts an array back t2 min readindexOf and includes, and that you can read basic regular expression syntax such as \d+ and the g flag.2 min readg flag. You should also know indexOf from the searching chapter and replace from the previous chapter. Three string methods take a regular expression and report wh2 min readslice. Those methods work well for plain English text. Emoji, many scripts outside Latin, and accented letters can make them return results you did not expect. The reason is the way JavaScrip2 min readsort and map. It also assumes you have read the earlier chapter on UTF-16 and code points. JavaScript stores strings as UTF-16 code units, and that storage format affects how the default comparison works.2 min read${} interpolation from the earlier chapter. It also assumes you are comfortable with rest parameters (...values) and Array.prototype.reduce.2 min readtypeof, and the difference between == and ===. It explains why "x" and new String("x") behave differently, and why you should almost always use the first.2 min readsplit, join, and array methods such as map. It covers the common ways to put a large string together from small pieces, and the mistakes that tend to come up along the way.2 min read