All posts

Tag

#javascript

3 posts

AI co-authored

Optional Chaining in JavaScript

Optional chaining is a feature introduced in ECMAScript 2020 that allows for accessing properties on an object without having to explicitly check if the object is null or undefined first. This results in less code and improves readability. Let's take a look at what optional chaining is and how to use it.

  • programming
  • javascript
AI co-authored

Leveraging Map, Reduce and Filter for Cleaner Code

When working with array data in JavaScript or Python, transforming, combining and filtering that data is a common task. However, using explicit loops every time can make your code messy and hard to understand. Luckily, there are built-in methods for handling these operations in a simple, declarative way - namely map(), reduce() and filter(). Mastering these 3 functional programming concepts can help you write cleaner and more maintainable code.

  • programming
  • javascript
  • python