gaearon/whatthefuck.is

What is a directive?

sevtapim opened this issue · 1 comments

'use strict' is a directive in JS. What does directive mean, how does it differ from a statement? Are import and export directives or statements?

use strict is the only well known, which I've covered here in discussing hoisting: https://thejs.dev/jmitchell/what-is-hoisting-and-how-it-works-in-javascript-e1e