JavaScript has a special syntax for prototypical inheritance model is which called JavaScript classes. JavaScript classes is comparable inheritance in class-based object oriented languages.

JavaScript has a special syntax for prototypical inheritance model which is called JavaScript classes. JavaScript classes are comparable inheritance in class-based object oriented languages.

JavaScript classes are a special function. WhenThe ECMAScript 2015 specification brought a lot of improvements, the largest set of changes the language has seen to-date. Classes are added to ES6. They behave like the class keyword from these other languages. We can make class declarations and class expressions because they are just…

Java scripts have very useful and powerful methods. We can map each in array to something else. A Map object iterates its elements in insertion order — a for or Of loop returns an array of [key, value] for each iteration. From the classic loop like for() or forEach method, There are many techniques and methods for using or iterating datasets in JavaScript. But map method is a popular method. Because the map method creates an array with a callback function on each item from the original array. Map() method is not mutating original arrays. …

In React, we can create multiple components which encapsulate behavior that we need. After that, we can render them depending on some conditions or the state of our application. In other words, based on one or several conditions, a component decides which elements it will return. In React, conditional rendering works the same way as the conditions work in JavaScript. We use JavaScript operators to create elements representing the current state, and then React Component update the UI to match them.

We will have 4 different approaches and we will take a detailed look at each of them

I will talk about inserting a Binary Tree in this article. We will see all the process of inserting in a value on our Binary Tree. In the beginning we have to create a new node, then we should find the correct spot for that new node depending on the value of the number. If you check the diagram you can realize how we can find the right place for our new node in our binary tree.

Let’s say we are planning to add number(15) in our Binary Tree. …

Recursion is one of the difficult techniques to solve Data structure problems. It looks like a loop concept but it’s not easy to understand like how loops work. You can solve some problems with the loops but recursion does not require local variables to maintain local state. Recursion is also easy to write the code and test because they are pure manners. They are returning specific consistent value given input.

Recursion can be used in many situations. But most effective used in solving problems. …

What is tree ?

Trees are very important data structures that collection of nodes just like the linked lists. The differences with linked lists and trees is that trees has parent and child relationships.

The meaning of tree is about the structure of a Binary tree. Basically there are some parent nodes that have some child nodes that give us the direction to reach data easier and faster. Binary Tree structure looks like a tree. This is the reason we call them trees. You can think of a big tree which has many branches and lit splits at some point…

There are two important data structures used in Web development. Stack and Queue are most commonly used in the industry. My previous blog was about stack. I will dive in the queue and try to explain how to implement a queue structure in Javascript. Some programming languages have their own queue data type but JavaScript does not have its own stack data type. But javascript allowed us to implement queue data type from scratch.

What is queue ?

The queue is very similar data structure like stack. Add data in and remove data out. These are the only two operation…

Stack is a linear data structure which follows a particular order in which the operations are performed. I will try to explain Stack with these objectives:

  • What is the Stack?
  • What is the Definition?
  • What are the use cases for a stack in the real world?
  • How to Implement operations on a stack data structure?

What is the Stack?

Stack is data collection of data structure. It’s a data collection which relies on LIFO principles. I know you are starting to think about the meaning of “ LIFO” The LIFO means the last element added to stack will be the…

When we create any react application, it’s mostly to rely on User interaction; When the user interacts with the application event it fires. For example (mouse clicks, key press, change event etc.). Application has to handle events and make the code work. I will explain how to handle events that work in React applications.

As you below I created a PlayerInput component. PlayerInput component is handling creating a new player profile on my application. When the user creates a new player profile, This component will make it happen.

PlayerInput Component is a class component. It’s handling state in the Component…

Soner Mezgitci

Software Engineer | Ruby on Rails | JavaScript | HTML5 | CSS | PostgreSQL | React | Redux

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