Let's introduce 10 basic things in JavaScript.

Type of JavaScript Values:

Data types basically specify what kind of data can be stored and manipulated within a program. There are two kinds of JavaScript values and they are 1)Primitive values and 2)Object and Functions. The 9 types of primitive values are Undefined, Null, Booleans, Numbers, Strings, Symbols, Bigints.On the other hand, the other two types are Object and Functions.

Expression in JavaScript:

In JavaScript, an expression is a snippet of code that evaluates to a value. Wherever JavaScript expects a statement, we can write an expression. The expression is a piece of code that expresses a value. We ask JavaScript 2+2, and it answers with 4.Expressions always result in a single value.

0 // 0

1 + 1 // 2

'Hello' + ' ' + 'World' // 'Hello World'

{ answer: 42 } // { answer: 42 }

Object.assign({}, { answer: 42 }) // { answer: 42 }

answer !== 42 ? 42 : answer // 42

answer = 42 // 42

Error handling, “try..catch”:

Sometimes we face an error. Then we need this function. The try…catch statement marks a block of statements to try and specifies a response should an exception be thrown.

Statement of try…catch:


} catch (error) {


Coding Style:

Everything needs art that makes it clean and readable. If our code is not clean then it becomes very difficult to read and understand. There have many things to make code clean and readable. Using const instead of let, Always use semicolons, Use ES6 arrow functions where possible, Always use curly braces around control structures, etc are things which make code clean and readable.

Comments in JavaScript:

Using comments in code is very important. It helps us to understand many points in code. An important sign of a good developer is comments ; their presence and even their absence. Good comments allow us to maintain the code well, come back to it after a delay and use it more effectively.

/*This is comment symbol*/

//Nahidul Islam

Caching in JavaScript:

Caching is a general computer concept that provides efficiency through data availability. It reduces the start-up time of commonly visited websites by caching the result of parsing+compilation. The mechanism by which this is accomplished is through the storage of commonly accessed data in several places, and then serving that data to requesters from the common data store. There have many types of caching. You should google it for details.

Cross Browser Testing:

Cross-browser testing means to validate any application on various browsers to ensure that it is working and the quality is validated. Google Chrome, Mozilla Firefox, Internet Explorer, Microsoft Edge; these browsers are mainly covertly during Cross-browser testing unless the application has its own requirements.

Why Cross Browser issues occur?

Some browsers may have different levels of support for technology features than others. This is inevitable when you are dealing with bleeding-edge features that browsers are just getting round to implementing, or if you have to support really old browsers that are no longer being developed, which may have been frozen a long time before a new feature was even invented. Also, some devices may have constraints that cause a web site to run slowly or display badly and more reason besides.

Block Bindings In ES6:

The way variable declarations work has been one tricky part of programming in JavaScript.Here your variables are actually created depends on how you declare them, and ES6 offers options to make controlling scope easier. In most C-based languages, variables are created at the spot where the declaration occurs but JS does not follow this.

Arrow Function in JavaScript:

Arrow functions are a new way to write anonymous function expressions and are similar to lambda functions in some other programming languages. Arrow functions differ from traditional functions in a number of ways, including the way their scope is determined and how their syntax expressed. Because of this, arrow functions are particularly useful when passing a function as a parameter to a higher-order function, such as when looping over an array with built-in iterator methods.

hello = () =>{

return “Hello World!”;




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store