diff --git a/README.md b/README.md index c417bad..4f64934 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ |33 | [replaceAll](#replaceAll)| |34 | [Required Function Params](#Required-Function-Params)| |35 | [Get input value as a number](#Get-input-value-as-a-number)| +|36 | [Creating a function using Function constructor](#create-a-function-using-function-constructor)| + @@ -753,4 +755,16 @@ function checkMyType(event){ } +``` + +**[⬆ Back to Top](#table-of-contents)** +### Create a function using Function constructor +```javascript +function bar() { + return new Function('return "x"'); + }; +var x = bar(); +x();//returns x + + ```