10 things that every Js Developer needs to know.

Albi Ummid
3 min readMay 6, 2021

1. Block Bindings

The word bindings refer to variable .so, blocking a variable to a specific area called block bindings—most C-based languages, variables created at the spot where they used. But before coming, EcmaScript6 classic var was used, and they can be accessed from anywhere. Then EcmaScript6 brings “let” and “const” to block them.

Example:

2. Function with default parameter values

In Javascript function runs with parameter is needed. But if we don’t declare them. What would be happened?

Then it uses the default parameter. The default parameter of Javascript is Undefined and can be changed.

Example:

3. Try and catch (error handling);

when we err our code was unable to execute but we didn’t get any confirmation of error. Here catch come. First of all, in try part try to execute code. If it gets any error then its process will be stopped and flow beginning of catch(error);

Example:

4. Var declaration

We use the reserved keyword var in JavaScript to declare a variable. A variable must have a unique name. We can assign a value to a variable using equal to (=) operator when we declare it or before using it.

Example:

var one = One;

var five = “5”

5. The spread operator

The spread operator is a new addition to the set of operators in JavaScript ES6. It is used for making a new array or object and adding multiple object and array.

Example:

6. Arrow function

Arrow function is a replacement of the traditional function structure of JavaScript.It is popular nowadays but it has limitations too.

Examples:

7. Cross Browser testing

Every single Browser has its own runtime engine to run JavaScript and display web things. Evey Browser has its own function handling method and many old browsers are outdated or not capable to run modern JavaScript or CSS framework. Some devices may have constraints that cause a website to run slowly or display badly. so testing web applications in all browsers called cross-browser testing.

The workflow for testing and bug fixes on a project is:

Initial planning > Development > Testing/discovery > Fixes/iteration

8. Line Length of code

Many of us code in a line until our expression ends. But it is a bad practice. No one likes to read along the horizontal lines of code. so splitting code is best.

Example:

9.Indent for readable code

There is two types of indent :

i.horizontal: padding in horizontal area.

ii. vertical: padding in vertical area.

Example:

10.Using Semicolons

A semicolon should be used after every statement. But sometimes it can be skipped. but Some cases semicolon is needed because without a semicolon JavaScript runtime engine doesn’t understand where the line end. So most of the developer always use Semicolons and never skip them.

--

--

Albi Ummid
0 Followers

A self motivated JavaScript developer