Category: JavaScript Tutorial

python tutorials and learn python

Created with Sketch.

JavaScript Event Loop

JavaScript Event Loop Summary: in this tutorial, you’ll learn about the event loop in JavaScript and how JavaScript achieves the concurrency model based on the event loop. JavaScript single-threaded model JavaScript is a single-threaded programming language. This means that JavaScript can do only one thing at a single point in time. The JavaScript engine executes…
Read more

JavaScript Call Stack

JavaScript Call Stack Summary: in this tutorial, you will learn about the JavaScript Call Stack which is a mechanism to keep track of the function calls. Introduction to JavaScript Call Stack A call stack is a way for the Java engine to keep track of its place in code that calls multiple functions. It has…
Read more

JavaScript Execution Context

JavaScript Execution Context Summary: in this tutorial, you will learn about the JavaScript execution context to deeply understand how JavaScript code gets executed. Introduction to the JavaScript execution context Let’s start with the following example: let x = 10; function timesTen(a){ return a * 10; } let y = timesTen(x); console.log(y); // 100 Code language:…
Read more

JavaScript Reflection

JavaScript Reflection Summary: in this tutorial, you will learn about the JavaScript reflection and Reflect API in ES6. What is reflection In computer programming, reflection is the ability of a program to manipulate variables, properties, and methods of objects at runtime. Prior to ES6, JavaScript already has reflection features even though they were not officially…
Read more

JavaScript Proxy

JavaScript Proxy Summary: in this tutorial, you will learn about the JavaScript Proxy object in ES6. What is a JavaScript Proxy object? A JavaScript Proxy is an object that wraps another object (target) and intercepts the fundamental operations of the target object. The fundamental operations can be the property lookup, assignment, enumeration, and function invocations,…
Read more

JavaScript const: Declaring Constants in ES6

JavaScript const: Declaring Constants in ES6 Summary: in this tutorial, you’ll learn how to define constants by using the JavaScript const keyword. Introduction to the JavaScript const keyword ES6 provides a new way of declaring a constant by using the const keyword. The const keyword creates a read-only reference to a value. const CONSTANT_NAME =…
Read more

Differences Between var and let

Differences Between var and let Summary: in this tutorial, you will learn about the differences between the var and let keywords. #1: Variable scopes The var variables belong to the global scope when you define them outside a function. For example: var counter; Code language: JavaScript (javascript) In this example, the counter is a global…
Read more

JavaScript let: Declaring Block-Scoped Variables

JavaScript let: Declaring Block-Scoped Variables Summary: in this tutorial, you will learn how to use the JavaScript let keyword to declare block-scoped variables. Introduction to the JavaScript let keyword In ES5, when you declare a variable using the var keyword, the scope of the variable is either global or local. If you declare a variable…
Read more

Optional catch Binding

Optional catch Binding Summary: in this tutorial, you will learn how to use the optional catch binding in the try…catch statement. Introduction to the optional catch binding The try…catch statement is used to handle any errors that may occur. Generally, you place the code that may cause an error in the try block and the…
Read more

JavaScript Throw Exception

JavaScript Throw Exception Summary: in this tutorial, you’ll learn how to use the JavaScript throw statement to throw an exception. Introduction to the JavaScript throw statement The throw statement allows you to throw an exception. Here’s the syntax of the throw statement: throw expression; Code language: JavaScript (javascript) In this syntax, the expression specifies the…
Read more