Brendan Eich knew it would be impossible to create a programming language without mistakes in 10 days, so he created a multi-paradigm type of language.
Multi-paradigm is a term in computer programming that allows different styles of programming. That is the ability to structure code in different ways.
The directive looks like a string,
"use strict" or
'use strict'. It is either located at the topmost of a script or the top of a function.
For example, an undeclared variable will lead to a bug when
use strict is used in a program.
'use strict'; name = 'Bello'; // ReferenceError: name is not defined console.log(name);
'use strict'; const name = 'Bello'; console.log(name) // Bello
It is a good practice to
"use strict" mode at the top of a program (script) or the top of a function. In future articles, the line for
"use strict" will be skipped.
- Get a website with a free domain name for 1st year and a free SSL certificate.
- 1-click WordPress install and 24/7 support.
- Starting at $3.95/month.
- 30-Day Money-Back Guarantee.