-
JavaScript BigInt
There is a specific numeric type, providing support for integers of arbitrary length. It’s known as biting. You can create a bigint by appending n to the end of an integer literal. Another way of creating a bigint is to call the function BigInt, which generates bigints from numbers, strings, and so on. Let’s see it in action:…
-
JavaScript Currying
In JavaScript, there exists an advanced technique of working with functions. It is called carrying. However, it is used not only in JavaScript but also in other programming languages. Generally, it is a transformation of functions.So, it translates a function from callable likef(a, b, c) to f(a)(b)(c) . A function can’t be called by currying. What it does is merely…
-
JavaScript Eval
In this chapter, you will see how a JavaScript built-ineval() function works. Normally, it is used for evaluating a JavaScript code, which is represented as a string. The syntax of the eval() function is the following: For a better perception, you can check out the following example: Eval is considered a function property of the global object. As a rule, the eval() function’s argument is…
-
JavaScript Proxy and Reflect
Proxies are commonly applied in various libraries and several browser frameworks. A Proxy object is used for wrapping another object and intercepting operations such as writing and reading properties, dealing with them, or transparently making the object to handle them. Proxy The first thing to know is the syntax of proxy, which looks as follows: This syntax…