async iterator and generators

ref – https://jakearchibald.com/2017/async-iterators-and-generators/ Standard fetch, and read

regular iterator

async iterator

Generator

Diving Deeper With ES6 Generators https://codeburst.io/what-are-javascript-generators-and-how-to-use-them-c6f2713fd12e Generators are functions that you can use to control the iterator. They can be suspended and later resumed at any time. Declaring generators

However, we cannot create a generator using the arrow function.

code version

generator version But the most significant change is that it does […]

immediate functions

ref – https://blog.kevinchisholm.com/javascript/javascript-immediate-functions-basics/ In JavaScript, the immediate function pattern is a way of executing a function as soon as it is defined. In this article, I will explain the syntax and explore some of the advantages of using it. This syntax can also be referred to as a closure. An example of an immediate function: […]

implementing the feedTheKraken

Get the project running Download the source code onto your computer download v1.0 cd into the directory, and install all packages npm install Then start the server: npm start You should see the server starting up. In the directory, there is an index.html file. Double click it. You’ll see the web page. Go ahead and […]

Automatic type conversion, implicit data types conversion

ref – https://www.sitepoint.com/automatic-type-conversion/ http://www.discoversdk.com/blog/data-type-conversion-in-javascript https://www.digitalocean.com/community/tutorials/how-to-convert-data-types-in-javascript As a programming language, JavaScript is very tolerant of unexpected values. Because of this, JavaScript will attempt to convert unexpected values rather than reject them outright. This implicit conversion is known as type coercion. Type Checking In JavaScript you can check the type of an object or data contained in […]

Mixin

ref – https://javascript.info/mixins a mixin provides methods that implement a certain behavior, but we do not use it alone, we use it to add to the behavior to other classes. In other words, Mixins are used to extend the behavior of objects by providing a set of reusable functions. The simplest way to make a […]

Prototypal Inheritance in Javascript

ref – http://aaditmshah.github.io/why-prototypal-inheritance-matters execute as constructor function vs standard function In javascript, we have the “new” keyword, which is used with functions in order to use it as a constructor function. If you use it without the “new” keyword, you are simply calling it as a standard function. Problem with using “new” We create a […]