Blog

python tutorials and learn python

Created with Sketch.

The Beginner’s Guide to JavaScript Set Type in ES6

The Beginner’s Guide to JavaScript Set Type in ES6 Summary: in this tutorial, you will learn about the JavaScript Set object that allows you to manage a collection of unique values of any type effectively. Introduction to the JavaScript Set object ES6 provides a new type named Set that stores a collection of unique values…
Read more

JavaScript Map Object

JavaScript Map Object Summary: in this tutorial, you will learn about the JavaScript Map object that maps a key to a value. Introduction to JavaScript Map object Before ES6, we often used an object to emulate a map by mapping a key to a value of any type. But using an object as a map…
Read more

The Ultimate Guide to JavaScript Symbol

The Ultimate Guide to JavaScript Symbol Summary: in this tutorial, you will learn about the JavaScript symbol primitive type and how to use the symbol effectively. Creating symbols ES6 added Symbol as a new primitive type. Unlike other primitive types such as number, boolean, null, undefined, and string, the symbol type doesn’t have a literal form.…
Read more

JavaScript Top-level await

JavaScript Top-level await Summary: in this tutorial, you’ll learn about the JavaScript top-level await and its use cases. Introduction to the JavaScript top-level await ES2020 introduced the top-level await feature that allows a module to behave like an async function. A module that imports the top-level await module will wait for it to load before…
Read more

JavaScript import

JavaScript import Summary: in this tutorial, you’ll learn how to dynamically import modules by using the function-like import() in ES2020. Introduction to the JavaScript import() ES6 introduced the module concept that allows you to develop modular JavaScript code. Suppose you have the following simple HTML document that has one button: <!DOCTYPE html> <html> <head> <title>Module…
Read more

A Comprehensive Look at ES6 Modules

A Comprehensive Look at ES6 Modules Summary: in this tutorial, you will learn about ES6 modules and how to export variables, functions, and classes from a module, and reuse them in other modules. An ES6 module is a JavaScript file that executes in strict mode only. It means that any variables or functions declared in the…
Read more

JavaScript Async Generators

JavaScript Async Generators Summary: in this tutorial, you’ll learn about the JavaScript async generators that iterate over data that comes asynchronously. What is an async generator? An async generator is similar to a regular generator except that its next() method returns a Promise. To iterate over an async generator, you use the for await…of statement.…
Read more

JavaScript Asynchronous Iterators

JavaScript Asynchronous Iterators Summary: in this tutorial, you will learn about the JavaScript asynchronous iterators that allow you to access asynchronous data sequentially. Introduction to JavaScript Asynchronous Iterators ES6 introduced the iterator interface that allows you to access data sequentially. The iterator is well-suited for accessing the synchronous data sources like arrays, sets, and maps.…
Read more

JavaScript for…of Loop

JavaScript for…of Loop Summary: in this tutorial, you’ll how to use JavaScript for…of statement to iterate over iterable objects. Introduction to the JavaScript for…of loop ES6 introduced a new statement for…of that iterates over an iterable object such as: Built-in Array, String, Map, Set, … Array-like objects such as arguments or NodeList User-defined objects that implement…
Read more

JavaScript yield

JavaScript yield Summary: in this tutorial, you will learn about the JavaScript yield keyword and how to use it in generator functions. Introduction to the JavaScript yield keyword The yield keyword allows you to pause and resume a generator function (function*). The following shows the syntax of the yield keyword: [variable_name] = yield [expression]; Code…
Read more