Sugar syntax in TS/JS: sweetening your code 🍨

In the vast realm of programming languages, syntax dictates the structure and clarity of your code. While both TypeScript and JavaScript offer various syntactic constructs, “sugar syntax” refers to concise shortcuts that improve readability and maintainability. This article explores the key sugar syntax elements in these languages, equipping you to […]

Read More…

Array functions in Javascript ES6

Let’s look at array functions today. One of the best features that the new javascript offers is the ability to work on lists of data in a few lines of code. We have them all, from mapping to searching or data aggregation. Many of the functions used, in addition to […]

Read More…

Javascript custom array sorting functions

One of the most useful features that many languages offer is the possibility of sorting arrays and lists of elements in the most disparate ways. Let’s create our array sorting functions.Unlike more typed languages, in the case of Javascript arrays can have profoundly different types of elements, including primitives and […]

Read More…

Javascript exercise of random cards

An exercise of javascript random cards

It happened to me once to complete an interesting and curious javascript exercise of random cards. The request was as follows: ” Having a deck of French cards (consisting of 52 cards), 10 cards must be drawn (using the Math.random function). Of those decide the suit and number of each […]

Read More…

ES6 Javascript Arrow functions

ES6 Arrow functions

Arrow functions are a new ES6 Javascript feature to write more readable and shorter code, with the same results. It came with another new feature like the “let/const” renaming from the ES5 “var”. It may seem very similar to the anonymous functions of ES5 but with some small differences. A […]

Read More…