JavaScript | Complete Guide to Understanding “This” Keyword

Javascript is becoming more popular for building web applications and mobile apps using React Native framework. Therefore, understanding its key concepts can come in quite handy. The “this” keyword in Javascript is a source of confusion and misery for most beginner Javascript developers and even pro-developers. This post aims to give you a beginner-friendly comprehensive … Read more

Rust | How to Read User Input (stdin) In Rust?

It is common to learn how to detect user input (stdin) when learning a new programming language, and Rust is not the exception. In this article, you will learn how to read the user input from a terminal. Here are the steps to read user input (stdin) in Rust: Import the std::io crate Generate a … Read more

How to use Array Reduce in JavaScript: A Complete Guide

The Array Object in Javascript supports several methods that you can use to manipulate the array elements. These include the array.map(), array.sort(), array.filter(), array.reduce() etc. The latter – array.reduce() method – is regarded as one of the most tricky array methods and can be quite hard to understand at first glance. However, it’s a powerful … Read more

JavaScript | How Double Bangs (Exclamation Marks) !! Work

In Javascript, most users are well familiar with the single exclamation mark (“!”) symbol (the logical “not” operator) used to reverse a boolean value. For example, !true will return false and !false will return true. Now, you must have come across the double exclamation mark !! symbols in your coding journey. Some developers call them … Read more

Rust | The Difference Between .clone() and .to_owned()

Chances are you recently came across the definition of the ToOwned trait to realize it is a generalization of the Clone trait? If so, what is the difference between the two traits? more specifically, what is the difference between .clone() and .to_owned() if they work the same? A generalization of Clone to borrowed data. https://doc.rust-lang.org/std/borrow/trait.ToOwned.html#tymethod.to_owned … Read more

How to use Array Sort in JavaScript: A Complete Guide

Arrays always come in handy when writing any piece of Javascript code. You can use them to hold a list of items either as objects, strings, numbers, or a mix of both strings and numbers. Similar to other programming languages, the Array object in Javascript supports a variety of methods. They include: pop(), push(), toString(), … Read more