DEV Community

Cover image for 12th weekly post, empty string is everywhere. Also, AWS Lambda goes Arm.
LongYC
LongYC

Posted on • Originally published at longyc.com

12th weekly post, empty string is everywhere. Also, AWS Lambda goes Arm.

Items of the week

  1. JavaScript - anyString.includes('') returning true might seem absurd but the behaviour matches anyString.substring(0, 0) returning '' and anyString.indexOf('') returning 0. Be careful when attempting something like providedString.includes(searchString). More on the method on MDN Web Docs.

  2. TypeScript - JSX is the reason we can type cast using the as operator (HTMLElement as HTMLInputElement) in addition to using angle brackets (<HTMLInputElement> HTMLElement) which will be difficult to parse when mixed with JSX HTML-like syntax, as stated on TypeScript official documentation page.

  3. AWS - Lambda functions can now run on the Arm-based Graviton2 processors by specifying arm64 as the architecture. It is said to be able to provide up to 34% price performance improvement. Details are available on the official AWS blog page.

Note of the week

On the week 39 of 2021, I learned that the Kindle's Vocabulary Builder feature not only automatically add words as flash cards, but also show the usage of a word in the book. Having that usage context might have encouraged me to use the feature more but I wish I could've discovered it couple of years earlier. That's all for this post, thank you for reading and if you have got any feedback, do let me know by leaving a comment. Have a nice day!

Top comments (0)