Loops, together with Iteration, may not be one of the most important and handy tools in programming. Any code without looping (where it is applicable) would be impossible or, at least, a nightmare in programming, requiring many lines of unnecessary code, undermining abstraction, and making our code difficult to write and to read. But first of all, we are to differentiate looping from iteration. Iteration requires an array and runs over its arguments while for looping a programmer must set conditions like: do anything for a certain time; do anything while something is true, don’t do anything unless something is…


Photo by Ali Kazal on Unsplash

Despite having a single HTML page with id=”root”, React client-side routing allows us to navigate through different ‘pages’ seamlessly, by rendering components instead of pages. Let’s pretend, that our routes look something like these:

https://www.mypage/

https://www.mypage/about

In React, we create Single Page Application, with single HTML, CSS, and JavaScript files unlike creating pages with other languages. In client-side routing, all these data rendered when the page loads unlike those using separate HTML pages. This provides the advantage of loading the data much faster when we click on the links (while they were preliminarily loaded) as we stored everything on the…


Loops, together with Iteration, may not be one of the most important and handy tools in programming. Any code without looping (where it is applicable) would be impossible or, at least, a nightmare in programming, requiring many lines of unnecessary code, undermining abstraction, and making our code difficult to write and to read. But first of all, we are to differentiate looping from iteration. Iteration requires an array and runs over its arguments while for looping a programmer must set conditions like: do anything for a certain time; do anything while something is true, don’t do anything unless something is…


If you want to understand the meaning and importance of this keyword in JavaScript just from the start, you need to ask the right questions and avoid using the wrong ones. If you want to ask something like “so what exactly this keyword means”, I will interfere abruptly and point out that this a wrong question to ask. If, on the other hand, you ask “so what exactly does this keyword mean in this particular context or environment, or scope”, I would say that you’re on a right track. And once you add “Is this keyword dynamic or static?” I…


In my homeland, I graduated from Medical University, but in the USA you should study over again to become a doctor. So I had to decide which occupation I am to dedicate my time and energy and for what kind of job I can be proud of. From different ramifications, I decided to select programming courses for several reasons. Putting it programmatically, you can write a method called “career_builder”, which gives you different pieces of advice based on data you insert, such as name, age, and occupation. Let’s put it in Ruby way:

def career_builder(name, age, occupation)
if age <= 18…


Component Lifecycle methods help React to adapt quickly whenever the user interaction occurs or the Component updates. In order to understand their usage better, we can separate them into three major parts, create, update, destroy (or Mounting, Updating, Unmounting), just like the human beings’ lifecycle is divided into three major parts such as birth, change, and death, respectively. To transfer these functionalities into practical use, we can say that whenever the user opens a web page or creates something, the Lifecycle method responsible for creation is invoked, whenever the user changes anything, the Lifecycle update method is triggered. When the…


Forms both in React and in other programming languages are one of the most often used attributes that can either bring to better user experience or dissatisfaction whenever the data cannot be submitted. Either you want to sign in or sign up, they are the essentials part of most web applications. But let’s stay positive and build a form that will not eventually break and will work seamlessly, the way it’s supposed to. For this reason, we’ll build React-based and backed forms that are relatively easy to build and require full implementation of one of the main React properties called…


Programming has many similarities with real-life examples. For instance, when we think of a Prototype, we think of commonalities adding specific properties that make it unique, like all the cars have wheels, engines, etc., but have different make and models. When we think of React Components, we think of many reusable tools combined together that can help solve issues both separately and as a whole. The Components are the soul and the heart of the React library that represent reusable JavaScript functions which can be used and fixed separately, thus answering to the separation of concerns concept and making the…


In programming, like in life, it’s sometimes vital to know an answer to a simple question, is it truth or lie. For instance, when a husband asks his wife whether there is $10,000 on their bank account, depending on the wife’s answer (let’s assume they're honest with each other), they’ll decide whether they will spend this summer in Rome or not. If she says yes, he goes and buys tickets to Italy, otherwise, they stay at home and watch Italian movies. …


Mountain Ararat

In this article, we’ll go through concept of hoisting, it’s definition and implementation.

Hoisting represents a system or mechanism by which variables and functions are moved to the top of the scope before the code is being executed.

That means, that we have access to the variables and/or function no matter where in scope they are written. Consider the following example

console.log(name)
var name = "Adam" // "undefined"

Here, in the first line, we try to console log the name variable, which is declared only on the second line. So, by an idea, hoisting will mean that this var name…

Emil Andreasyan

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