JavaScript in 10 topic..

Mdparveg
4 min readNov 1, 2020

1st What is JavaScript??

Well, I can say JavaScript is a programming language, and not only programming language also we can say it’s a high-level programming language…

Q1:- Well now you have a question in your mind that what is high-level language??

=> High-level language means this language is softly coded. That’s mean when you need to use it you need not know too much about machine. On the other hand, if you look at the c or c++ language those are not a high-level language because of when you need to use those languages you must know about the machine enough otherwise you can’t use anymore properly…

Q2:- Now you can say what is the benefit to using high-level programming language??

=> Well when you are going to make a complex app then you have to think from the root and variable’s and also budget. You will haven’t too much time to think about functionality and once time you will be disappointed.

On the other hand the using high-level language like JavaScript you don’t need to much think about what is running behind the scene. You can start your main functionality work and you can give your full attention to your work.

2nd Variables..

=> Well normally we can say that variable is a placeholder of information. It’s works like a memory bucket that can hold your data…

In JavaScript new variable declared with “var”. But in 2015 after releasing ES6 we declare the variable with “let” and “const”.

  1. “let” allows you to declare block-level variables. The declared variable is available from the block it is enclosed in.
  2. “const” allows you to declare variables whose values are never intended to change. The variable is available from the block it is declared in.

3rd Loop…

=> In programming sometimes we need to do a same work. On those time we use loop.

There is a 5 main loop in JavaScript..

  1. For loop.
  2. While loop.
  3. do.. while loop.
  4. break loop.
  5. continue loop.

Today I discuss only 2 types of loop..

  1. For loop usually used if you want to do a job for a certain time. Here is the beginning, then how long it will last and finally how far you want to go in each step.

Structure..

Example…

for(var i = 0; i < 10; i++) {
console.log('Go ' + i + ' step');
}

2. While loop is works like a for loop just the structure is different..

Example:-

for(var i = 0; i < 10; i++) {
console.log('Go ' + i + ' step');
}

today is done with loop.

4th Object…

=> Object is a core part of JavaScript. Let’s discuss below about Object.

Usually when you need to store someone’s information on that time you can use object..

you can also store in a variable but it’s easy to store in object because from object you can find data easily..

5th Array…

=> Array is also a core part of JavaScript. Let’s discuss below about Array…

Shortly we can say that array is store of multiple variable or object collection… Where we can store of multiple string, number and object also.

we will discuss array in next several day.

6th Data types..

=> There is 3 data type’s in JavaScript… We will know about in the data type’s below..

  1. String… => In JavaScript alphabet call string.. That’s mean all type of word is call string.. and all sting will wrote into the double quotation or single quotation. as like that..

var x = 16 + “Volvo”;

2. Number… => All type’s of number is a number type data.

3. Boolean… => This data is only “true” or “false”…

7th If else statement..

=> In JavaScript use two main conditional statement, those are If, else.

if(it is true){
Then the thing inside me will be executed }

example..

else{ the thing inside me will executed}

8th Operator..

=> There is some operator in JavaScript… those are wrote in below.

AND (&) OR (|) XOR (^) NOT (~) LEFT SHIFT (<<) RIGHT SHIFT (>>) ZERO-FILL RIGHT SHIFT (>>>)

9th Comparisons…

=> Sometime in programming we need to compare something..

  • Greater/less than: a > b, a < b.
  • Greater/less than or equals: a >= b, a <= b.
  • Equals: a == b (single = sign is an assignment rather than a comparitors).
  • Not equals. a != b.

10th Switch Statement..

=>Switch statements basically give you the ability to write options.

In the below the switch statement example…

switch(yourValueHere){
case ‘optionOne’ :
//your code here
break;
case ‘optionTwo’:
//your code here
break;
case ‘optionThree’:
//your code here
break;
default:
//your fallback code here
}

I think I can make your confusion a little bit clear about JavaScript…

Thank you.

--

--