Sekhudinsyaikhu.hashnode.dev·Jul 11, 2024Menangani Falsy Array: Optional Chaining vs Utility ClassDalam pengembangan aplikasi React, menangani array yang dapat bernilai falsy adalah hal yang penting untuk mencegah error runtime dan menjaga performa aplikasi. Ada dua pendekatan utama yang bisa digunakan untuk menangani situasi ini: Optional Chaini...falsy
manish bhardwajjustblogitmanish.hashnode.dev·Jul 8, 2024JavaScript Basics: How Loops and Conditionals Handle Truthy and Falsy ValuesHave you just started learning to code and used an "if condition" to make decisions based on an expression? If so, you have probably used Arithmetic Operators, Comparison Operators, or Logical Operators, among others. When I started learning to code,...JavaScript
Daniel Engelhardthardnold.hashnode.dev·Jan 23, 2024Why you should use ?? instead of ||We often see and write things like this: function sayHey(name) { name = name || "Precious"; console.log(`Hey ${name}`); } sayHey("Morty"); //Hey Morty sayHey(); //Hey Precious But did you know that the ?? operator, known as the nullish coal...2 likes·53 readsJavaScript
Sven Willhauksvensblog.hashnode.dev·Sep 10, 2023Day 16 of learning JavaScript: truthy & falsyHello, today we will fix a problem in the Chrome extension. The stored leads aren't getting displayed when we refresh the page. So how we want the extension to work is: If the local storage is empty, nothing will happen. If the local storage contains...34 readsJavaScript
Callumpericles.hashnode.dev·Jul 24, 2023Being negative with PythonPython is a dynamically typed programming language. This means it assigns types to variables whilst the program is running, as opposed to getting its types enforced via the programmer and/or a compiler. Whilst Python has added type hints to allow pro...47 readsPython 3
Ahmedahm4fut.hashnode.dev·Jan 27, 2023Truthy or Falsy values in JavascriptIntroduction: Truthy and falsy values are fundamental concepts in JavaScript. They determine whether an expression is true or false and are used in control structures and conditions. Understanding the difference between truthy and falsy values is cru...55 readsJavaScript
Somtochukwu Nwosusomyn.hashnode.dev·Jan 18, 2023Javascript: Truthy And Falsy ValuesHey there! Welcome to the new year! I hope you smash your goals and every other thing you have set out to achieve. In this article, we will read about Truthiness and Falsiness in JavaScript. All values have an inherent truthiness and falsiness to the...11 likes·85 readsJavaScript
Vikas Taliyanvikas360.hashnode.dev·Jan 9, 2023Truthy and Falsy value.To understand the truthy and falsy values in Javascript first, let's understand what is Null, Undefined and NAN- Undefined: let user; console.log(user); It means value does not exist in compiler or accessing value that is not defined. it's value for...JavaScript
Eklemis Santo Nduneknotes.app·Aug 1, 2022Beyond Javascript's true and false: Truthy and FalsyWhen you code, and you have to write an if statement like lines below: if (x_value){ //some code here } what do you think is logically correct value of the x_value? Either true or false, right? In Javascript though, you'll see some condition where ...105 readsJavaScript