随笔分类 - Javascript
摘要:Objects have the ability to use data and methods that other objects contain, as long as it lives on the [prototype] chain. In this lesson we’ll test t
阅读全文
摘要:In this lesson we write an imperative function to flatten nested arrays, and then use the popular map, reduce, compose, and pipe functions to transfor
阅读全文
摘要:JavaScript中有两种不同数据类型的值,分别是基本数据类型与引用数据类型 基本数据类型包含5类,分别是:Number、String、Boolean、Null、Undefined 引用数据类型包含剩下的Array、Date、Math、RegExp、Object、Function等 将一个值赋给变
阅读全文
摘要:We are able to cancel the fetch request by using AbortController with RxJS Observable.
阅读全文
摘要:Latest Javascript features, not supported by all broswers, but can use with babel. # try-catch-finally, Promise finally: # Regex: 1. Lookbehind: 2. Lo
阅读全文
摘要:Values assigned with let and const are seen everywhere in JavaScript. It's become common to hear them explained like so: "const creates an constant (i
阅读全文
摘要:function solution( tags = ['ul', 'ol']) { const [uls, ols] = tags.map(tag => Array.from($(`${tag}`))); const [logUl, logOl] = tags.map(tag => new Logg
阅读全文
摘要:JavaScript provides primitive types and means of processing those. However, those are not enough. Real data must somehow come into the program and dat
阅读全文
摘要:Functions are first class in JavaScript. This means we can treat a function like any other data. This also means we can end up with a function as the
阅读全文
摘要:The alt method allows us to recover from a nothing with a default Maybe, but sometimes our recovery efforts might need to enlist some logic to recover
阅读全文
摘要:Once we’re using Maybes throughout our code, it stands to reason that at some point we’ll get a Maybe and want to continue applying transformations. W
阅读全文
摘要:Sometimes, we run into situations where we end up with a Maybe within the context of another Maybe. Nested structures like this can get really confusi
阅读全文
摘要:In this lesson, we’ll look at the propPath utility function. We’ll ask for a property multiple levels deep in an object and get back a Maybe. We’ll ge
阅读全文
摘要:In this lesson, we’ll use a Maybe to safely operate on properties of an object that could be undefined. We’ll use our initial code as the basis for a
阅读全文
摘要:In this lesson, we’ll create a safe function that gives us a flexible way to create Maybes based on a value and a predicate function that we supply. W
阅读全文
摘要:In this lesson, we’ll get started with the Maybe type. We’ll look at the underlying Just and Nothing types and create a simple utility function to cre
阅读全文
摘要:When it comes to websites performance is king. How long it takes for a page to load can mean the difference of millions of dollars for large ecommerce
阅读全文
摘要:// Asynchronous iteration --> Symbol.asyncIterator async function main() { const syncIterable = [ Promise.resolve('a'), Promise.resolve('b'), ]; for await (const x of sync...
阅读全文
摘要:Hyperapp is an ultra lightweight (1kb), minimal, functional, JavaScript library for building UIs. It comes with a VDOM engine and state management wit
阅读全文
摘要:Hyperapp is an ultra lightweight (1kb), minimal, functional, JavaScript library for building UIs. It comes with a VDOM engine and state management wit
阅读全文

浙公网安备 33010602011771号