Most Important Topics In JavaScript

Shohelrana Baig
2 min readNov 2, 2020

JavaScript is a Scripting or programming language of the Web.

JavaScript is used for Web apps, Websites etc. We can use it for spontaneous to debug and test.

Most Important JavaScript topics are given below:

  1. Numbers.
  2. String.
  3. Variables.
  4. Operators.
  5. Arrays.
  6. Function.
  7. Conditionals.
  8. Loop.
  9. Boolean.
  10. Date.

1. Numbers:

The numbers in JavaScript means numerical numbers. Numbers can written integers or floating numbers.

Example: 5869 //integer-number ; 3.1416 //floating-number

2.Strings:

In JavaScript, string stores a series of character or textual data. Example: “My name is Shohel Rana” //string

There are many methods in strings such as:

str.charAt( ), str.concat( ), str.endsWith( ), str.fixed( ), str.indexOf( ), str.sub( ), str.substr( ), str.toLowercase( ), str.replace( ), str.trim( ), …. etc.

3.Variables:

JavaScript variables are containers for storing data values. There are three keywords — ( Var, Let and Const) used to declare a variable.

var: ‘ var’ is the keyword that says JavaScript you are declaring a variable.

let: ‘let’ if you have to rebind a variable.

const: use ‘const’ by default.

4.Operators:

Operators are the symbols between multiple values that permit different operations like addition, subtraction, multiplication, division and more. JavaScript has dozens of operators.

5.Arrays:

Collection of data of same-types. Arrays are used to store multiple values in a single variable.

An array is a particular variable which can hold more than one value at a time. Many types of arrays methods are given:

arr.concat( ), arr.filter( ), arr.find( ), arr.indexOf( ), arr.includes( ), arr.map( ), arr.pop( ), arr.push( ), arr.reduce( ), ..etc.

6.Function:

JavaScript functions are used to perform operations. we can call JavaScript many times to reuse the code.

<script>

function doWork( ){

alert(“hi! thank you for read this article”);

}

doWork();

</script>

7.Conditionals:

Conditional statement control behavior in JavaScript.

There are many different types of conditionals in JS including:

“if”-statements: where if a condition is true it is used to specify execute for a block of code.

“Else”-statements: where if the same condition is false it specifies the execute for a block of code.

“Else if”-statements: if the first condition is false, this specifies a new condition test.

8.Loop:

JavaScript loops are used to again and again run a block of code — until a certain condition is met.

There are three types of loops. they are —

for , while and do-while loop.

9.Booleans:

Booleans are values that can be one of two things.

true or false.

yes or no.

on or off.

10.Date:

In JavaScript , Date stores the date, time and provides methods for date or time management.

To create a new Date object call it — new Date( ).

Examples:

let date = new Date( );

alert( date ); // show current date/time

--

--