Blog

python tutorials and learn python

Created with Sketch.

Understanding Own Properties of an Object in JavaScript

Understanding Own Properties of an Object in JavaScript Summary: in this tutorial, you will learn about the own properties of an object in JavaScript. In JavaScript, an object is a collection of properties, where each property a key-value pair. This example creates a new object called person using an object initializer: const person = {…
Read more

A Basic Guide to Enumerable Properties of an Object in JavaScript

A Basic Guide to Enumerable Properties of an Object in JavaScript Summary: in this tutorial, you will learn about JavaScript enumerable properties of an object. Introduction to JavaScript enumerable properties Enumerable properties are iterated using the for…in loop or Objects.keys() method. In JavaScript, an object is an unordered list of key-value pairs. The key is…
Read more

JavaScript for…in Loop

JavaScript for…in Loop Summary: in this tutorial, you will learn how to use the JavaScript for…in loop to iterate over the enumerable properties of an object. Introduction to JavaScript for…in loop The for…in loop over the enumerable properties that are keyed by strings of an object. Note that a property can be keyed by a…
Read more

JavaScript Object Properties

JavaScript Object Properties Summary: in this tutorial, you will learn about the JavaScript object’s properties and attributes such as configurable, enumerable, writable, get, set, and value. Object Property types JavaScript specifies the characteristics of properties of objects via internal attributes surrounded by the two pairs of square brackets, e.g., [[Enumerable]]. Objects have two types of…
Read more

JavaScript globalThis

JavaScript globalThis Summary: in this tutorial, you’ll learn how to about the JavaScript globalThis object. Introduction to the JavaScript globalThis object ES2020 introduced the globalThis object that provides a standard way to access the global object across environments. Historically, JavaScript had a global object with different names in different environments. In web browsers, the global…
Read more

Demystifying the JavaScript this Keyword

Demystifying the JavaScript this Keyword Summary: in this tutorial, you will  learn about the JavaScript this value and understand it clearly in various contexts. If you have been working with other programming languages such as Java, C#, or PHP, you’re already familiar with the this keyword. In these languages, the this keyword represents the current instance…
Read more

JavaScript Prototypal Inheritance

JavaScript Prototypal Inheritance Summary: in this tutorial, you’ll learn how the JavaScript prototypal inheritance works. Introduction to JavaScript prototypal inheritance If you’ve worked with other object-oriented programming languages such as Java or C++, you’ve been familiar with the inheritance concept. In this programming paradigm, a class is a blueprint for creating objects. If you want…
Read more

JavaScript Constructor/Prototype Pattern

JavaScript Constructor/Prototype Pattern Summary: in this tutorial, you’ll learn how to use the JavaScript constructor/Prototype pattern to define a custom type in ES5. Introduction to the JavaScript Constructor / Prototype pattern The combination of the constructor and prototype patterns is the most common way to define custom types in ES5. In this pattern: The constructor…
Read more

JavaScript Prototype

JavaScript Prototype Summary: in this tutorial, you’ll learn about the JavaScript prototype and how it works under the hood. Introduction to JavaScript prototype In JavaScript, objects can inherit features from one another via prototypes. Every object has its own property called prototype. Because a prototype itself is also another object, the prototype has its own…
Read more

JavaScript Constructor Function

JavaScript Constructor Function Summary: in this tutorial, you’ll learn about the JavaScript constructor function and how to use the new keyword to create an object. Introduction to JavaScript constructor functions In the JavaScript objects tutorial, you learned how to use the object literal syntax to create a new object. For example, the following creates a…
Read more