Sitemap

Things You Must Know About Javascript

1 min readApr 7, 2020

--

Press enter or click to view image in full size
Photo by Bharat Patil on Unsplash

EMCA Standards help us universally make good judgments when writing our Javascript code.

Get Coffee Bytez’s stories in your inbox

Join Medium for free to get updates from this writer.

use strict;

This is a directive that indicates the code should be executed in strict mode. It only works on ECMAScript version 5+. In strict mode, it gives you a lot of “safety” features. For example, you can’t use a variable or object without first declaring it. You cannot also delete objects or variables. Another gotcha in strict mode is that the “this” keyword refers to the object that called it.

Function hoisting

In Javascript, functions are “hoisted” or moved to the top of their scope before execution. So you could call the function before it’s declared and it will still work, although you should declare it before you call it in your code for best practice. Also, note that a lot of these problems don’t exist when in strict mode.

Code Maintainability

One of the most important topics for a Javascript developer is code maintainability. Commenting your code, using good folder structure, not and doing your best to not “hard-code” anything will all help you out long-term.

--

--