[JavaScript] Difference between eval() vs new Function()

Many JavaScript programmers treat eval & new Function construct as the same. But new Function & eval are NOT the same. the important difference is:-

So both are evil & should only be used when there is no other way but as you may notice new Function is slightly less evil