-
-
Save TooTallNate/1294126 to your computer and use it in GitHub Desktop.
Testing if "use strict" requires functions to always return something...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
function test () { | |
console.log('hello?') | |
} | |
test() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, you're right. And it is not required. But I wanted to do it qua specificationem ;9
I'm using AcitveState Komodo IDE 7 Alpha with inbuilt syntax-check for Node and it notified me, that if it is run in a strict environment, it'd be against the rules. Quick check @ specification of ECMAScript and yes, there it was. All I wanted to do is stay safe by following the specification, who knows what V8 brings in time.