Telegram Web Link
Summary of the article: "JavaScript Logical OR vs. Nullish Coalescing Operator"

The article explains the differences between the Logical OR (||) operator and the Nullish Coalescing (??) operator in JavaScript:

- 🔍 Logical OR (||) Operator
- Used to return the first "truthy" value.
- Can behave unexpectedly with values like 0, '', or false.

- 🔍 Nullish Coalescing (??) Operator
- Returns the first value that is not null or undefined.
- Ideal for cases where 0, '', or false are valid values.

- 🔧 Examples
- let result = userInput || 'default';
- let result = userInput ?? 'default';

- 🌟 Conclusion
- Logical OR (||) is useful when falsy values need to be replaced.
- Nullish Coalescing (??) is preferable when only null and undefined should be considered as "absent" values.

Additional Tips:
- Performance: Both operations are quick in execution.
- Compatibility: Check for ?? support in older environments.
Resumo do artigo:

🧑‍💻 Programadores compartilham o que reavivou sua paixão pela programação após terem perdido o entusiasmo:

🛠️ Projetos pessoais e side projects sem pressão
🤖 Brincando com hardware como Raspberry Pi
🎨 Arte generativa e plotters
📝 Escrever sobre programação
🧩 Aprender novas linguagens como Rust, Elixir, Go
🏫 Ensinar programação a outros
🔧 Criar ferramentas para resolver problemas próprios
🏢 Mudar para empresas/ambientes de trabalho melhores
📚 Reler livros clássicos de programação
🤝 Trabalhar em projetos open source

A maioria enfatiza a importância de recuperar a diversão e criatividade, sem pressões externas.

Complemento:

Muitos também mencionaram a importância de desconectar-se da tecnologia às vezes, tendo hobbies não relacionados à programação. Isso ajuda a renovar a mente e trazer uma nova perspectiva quando voltam a programar.
Summary of the article:

🧑‍💻 Programmers share what rekindled their passion for programming after losing enthusiasm:

🛠️ Personal projects and pressure-free side projects
🤖 Playing with hardware like Raspberry Pi
🎨 Generative art and plotters
📝 Writing about programming
🧩 Learning new languages like Rust, Elixir, Go
🏫 Teaching programming to others
🔧 Creating tools to solve own problems
🏢 Switching to better companies/work environments
📚 Rereading classic programming books
🤝 Working on open source projects

Most emphasize the importance of regaining fun and creativity, without external pressures.

Many also mentioned the importance of disconnecting from technology sometimes, having hobbies unrelated to programming. This helps refresh the mind and bring a new perspective when they return to coding.
Please open Telegram to view this post
VIEW IN TELEGRAM
Web Dev PHP JS Design UI UX pinned «https://www.ntietz.com/blog/til-uses-for-the-different-uuid-versions/»
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
About silence posts
Anonymous Poll
65%
Better silence
35%
Better with notifications
2025/07/08 10:44:48
Back to Top
HTML Embed Code: