Function.constructor

Creates a new function.

Syntax

new(...args, body): Function;

Parameters

Return value

A new function.

Examples

let pow = new Function("x", "e", "return x ** e")
pow(2, 16)
65536