Revisit some Core concept of Javascript

Md Shohag Babu
4 min readNov 2, 2020
Javascript Picture

Small Introduction:

Javascript was founded in 1995 by Berdan Eich. Javascript has used an interface to communicate with the outside world. Some Important types are supported by javascript they are String, Object, Function, Undefined, Null, Number, etc.

Javascript Strings:

Javascript string means that couple of characters inside the single or double-quotes. When we declare a named variable then something written other side of the equal variable can be written by itself but the value should be placed inside the quotes. Some strings are described below :

Examples:

var message = “I love coding”;////I love codingvar message = ‘I want to become a developer’// I want to become a developerconsole.log(message)

Concatenation:

  • Most commonly used adding two-string together.
  • Add the extra string in the console log we use concatenation.
  • To add two or more variables together we use concatenation
  • Also, we can add variable and value by concatenation

Examples:

let learning = "javascript";
let teach = "learning";
console.lgo(learning + " " + teach)
result: // javascript learning
//Another Examplelet band = "Warfaze";
let song = "Bose Achi";
let playing;
playing = "playig: "+ Song + " by " + band;
console.log(playing);
//playing: Bose Achi by Warfaze

Index of ():

  • In the javascript, the index of () is used to find the value of word or character position in a string.
  • It will help to find the number of position of the specific word
  • We can tell that it's a word searcher if an index of () is not found that then it should be given the value of -1.

Examples:

let learning = "learning javascript is very interesting.";let output;
output = learning.indexOf("javascript");
console.log("position of the javascript is : ", output)//position of the javascript is 9

Slice ():

  • Slice is used to cut a string and make another new string
  • Slice is cut the string from first to last and last to the first position of the string
  • Slice is controlled by fixed the cutting position of the string

Example:

let article = "This is my first article at medium site";
let newArticle = article.slice(0, 10);
console.log(newArticle)
//This is my

Split:

String split is used as a separator of string. It should be separated with a space comma or a single letter. The splitter is given us new strings in an array.

Example:

let blog = "split is a separator";
let newBlog = blog.split(" ");
console.log(newBlog);
// ["split", "is", "a", "separator"]

Javascript Math:

In javascript, there is some mathematical function to do mathematical function we can use the math operators like PI, sin, etc. Math is work with number not string. Math is not an object. Discuss bellow about some math properties

Math.ceil():

Ceil is used to get an integer number. Ceil can make the fractional number as an integer number. If any number has a fraction then ceil can make it the next integer number.

Example:

Math.ceil Example

Math.floor:

The math floor is completely opposite of the Math.ceil it should cut the fraction site of the number and give the main integer number.

Math.floor Image

Javascript Array :

When we store many values in a single variable then it's call Array. That's why array is used to store the collection of data. We can also store objects data in an array and only value can store in the array. There are some methods of array they are:

Array filter:

The filter is used to identified value filtering. The filter can not change the value of an array but it follows the instruction and make another array from the previous array.

Example:

Array filtering image

Function:

The function is to define a block of code. The function is used for executing the name of the function so many times when it needs. Also, a function can include one or more parameters.

Example:

function image

Arrow function:

An arrow function is a shorter way of writing the function there is no need to write function words also there is no need to write the name of the function.

Arrow function image

SSL-Secure Sockets Layer:

  • SSL is the security system of a website also means that the encrypted system of a website
  • SSL system is secure the data from hacker

Type of SSL:

  • Extend Validation EV SSL
  • Organization Validated OV SSL
  • Domain Validation DV SSL
  • Wildcard SSL certificate
  • Unified Communication UC SSL
  • Single Domain SSL

SSL is a good thing for the website it needs to save the website from hacking. People can check their website from the link. There is some paying option to certified the website from SSL.

--

--

Md Shohag Babu
0 Followers

Front-end Javascript Developer. Enjoy to coding