Let’s write a readable code…does less code mean better performance?

Photo by John Barkiple on Unsplash
// fancy? but is it readable?
const isPositive = num => num >= 0
// naive but readable
function isPositive(num){
if(num >= 0){
return true
}
return false
}
  1. Readability is subjective: What I feel readable might not be the same for others. here is a good thread on it.

--

--

--

I write articles on JavaScript, electron, and react. Opted for curators for better reach, not money. Open link in incognito to read for free (or contact me)

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

2021.3| Genaro Network (GNX) Monthly Technical Report — March

What GitOps actually is and what it is not

Integrating Grafana Notifications with GitLab Pipeline to restart Debezium tasks using Go

My current Python Dev setup

You may already started using GitOPs without realizing it

Sound Effects Galore

My experience in GCI 2017 working with SCoRe

Forge Console — no more spinning wheel of death — Forge

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ishwar Rimal — @theHumbleBeing

Ishwar Rimal — @theHumbleBeing

I write articles on JavaScript, electron, and react. Opted for curators for better reach, not money. Open link in incognito to read for free (or contact me)

More from Medium

What’s a smart contract and (how does it work)?

CS373 Spring 2022: Nathaniel Nemenzo: Final Entry

From <h1>Hello World</h1> To Consuming an API

What are the keys to a happy and successful life?