What are callback functions and provide a simple example ?

Callback is just a function that is passed as an argument to another function. Also as known higher-order function. The callback should be invoked whenever the asynchronous task is finished. Callback functions are not asynchronous. The callback just allows you be informed when the asynchronous task has completed and handles the success or failure of the task.

Why do we even need Callback in Javascript ?

In order to deal with asynchronous operations, we can use Callbacks to inform the user when the task has completed.

What is a Promise…

The basic idea of Object Oriented Programming is that we use objects to model real world things that we want to represent inside our programs and/or provide a simple way to access functionality that would otherwise be hard or impossible to make us of. Generally to make this easier, we use class. JavaScript does not have classes, the way that Java and other languages have.

In this article, we will dive into what Classes do behind the scene by comparing it to Prototype…

JavaScript is an object-based language based on prototypes, rather than being class-based. Objects are not inherently class-based but it is often convenient to define class-like abstractions based upon a common pattern of constructor functions, prototype objects and methods. Built-in objects themselves follow such a class-like pattern by making use of the prototype property. In this article, we will look into built-in objects and prototypes.

Built-in Objects:

There are couple of built-in objects exist in javascript that extend the flexibility of the language. Many built-in objects are functions: they can be invoked with arguments. …

In order to understand “this” keyword clearly, we need to go through of how the execution context works at first. Every time you run some Javascript code, the engine creates a Global Execution Context. Every time a function is invoked, a brand new Local Execution Context is created for that function. Each function has its own execution context, but it’s created when the function is invoked or called. There can be only one Global Execution Context, there can be any number of Local Execution Contexts in one program.

What execution context looks like ?

The execution context is created during…

Yasemin çidem

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