- Published on
- Lorenzo Pieri
Table of Contents
Of course, all of this is a joke but there is a reason why statically typed languages (like C, C++, GO, Rust, Typescript) are all the fuss after a while. They add on more logic and boilerplate but they make the code and coding experience safer for you, the coder.
Does it look scary and more difficult? Of course it doesn't seem as easy as just repeating console.log all the times you need, but look at it from this perspective:
Now you can generalize what you are logging and you can log how many times you wish just by changing that number. Not only that, we went one step further and also generalized the subject of the feeling (hate or love) and used the modulo tool (%) to see whether the feeling should have been love or hate.
Are you thinking, like I'm thinking, that we went a little bit overboard? We did, but only to prove that you can generalize and abstract all kinds of logical implementation if you want to!
I often go there to search for native utilities and functions I don't remember (and trust me, it happens a lot!) and I also translated a few articles in my native language (italian).
let myArrayVariable =  myArrayVariable. // [browser will try and autocomplete]
At this point the browser's console will try and show you all the available methods for that particular Object Type.
I hope you found this article useful and to your liking and if you have any requests, drop a message on one of my social media accounts or open an issue/start a discussion on github, on this repository!