gaearon / whatthefuck.is

An opinionated glossary of computer science terms for front-end developers. Written by Dan Abramov.

Home Page:https://whatthefuck.is

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is a directive?

sevtapim opened this issue · 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