Learn About JavaScript & SSL Introduction

ROMEL
2 min readMay 5, 2021

JavaScript String:

There are two type of way to findings the character of a string.

console.log(‘successful’.charAt(4)) // e

console.log(‘successful’[4]) // e

Concatenation can be done by following way in JavaScript.

console.log(‘romel’.concat(‘ ‘+ ‘barua’)) // romel barua

JavaScript sting ending charterer checked by following way

console.log(‘Successfull man!’.endsWith(‘an!’, 16)) // true

console.log(‘Successfull man!’.endsWith(‘an!’, 6)) //false

console.log(‘Successfull man!’.endsWith(‘rock’, 16)) //false

String Index point can be obtained by following way

console.log(‘Successfull man’.indexOf(‘man’)) // 12

console.log(‘Successfull man’.indexOf(‘f’)) // 7

console.log(‘Successfull man’.indexOf(‘S’)) // 0

JavaScript string can be cut at any length by following slice methos

console.log(‘Successfull man’.slice(5)) // ssfull man

console.log(‘Successfull man’.slice(‘8’)) // ull man

console.log(‘Successfull man’.slice(‘-2’)) // an

console.log(‘Successfull man’.slice(3,5)) // ce

About JavaScript Number

In JavaScript Not A Number can be identified by following way

console.log(isNaN(‘romel’)); // true

console.log(isNaN(‘-5’)); // false

console.log(isNaN(undefined)); // true

console.log(isNaN(null)); // flase

console.log(isNaN({})); // true

console.log(isNaN([45])) // false

console.log(isNaN([9,6,’romel’])) // true

We can get the mathematical value from JavaScript by following example

console.log(Math.round(4.67)) //5

console.log(Math.ceil(4.67)) // 5

console.log(Math.floor(4.67)) //4

console.log(Math.sqrt(4.67)) //2.1610182784974308

console.log(Math.abs(-4.67)) // 4.67

console.log(Math.max(4.67, 7, 10)) // 10

console.log(Math.min(4.67, 7, 10)) // 4.67

JavaScript Array:

By using forEach operation we can get the array’s index, individual string etc are mentioned below

let name = [‘Romel’, ‘Barua’, ‘Kamal’];

name.forEach(function(friendName, indexNumber, array){

console.log(friendName, indexNumber)

})

//Romel0

// Barua1

// Kamal2

We can add string or number in array by push operation is shown below

let name = [‘Romel’, ‘Barua’, ‘Kamal’];

let newFriend = name.push(‘Rahim’)

console.log(name)

// [“Romel”,”Barua”,”Kamal”,”Rahim”]

3. By shift operation we can remove items from array from beginning.

let name = [‘Romel’, ‘Barua’, ‘Kamal’, ‘janil’];

let removeFriend = name.shift()

console.log(name)

[

“Barua”,

“Kamal”,

“janil”

]

We can add items in the beginning of an array by using unshift operation

let name = [‘Romel’, ‘Barua’, ‘Kamal’, ‘jamil’];

let removeFriend = name.unshift(‘Messi’)

console.log(name)

// [

“Messi”,

“Romel”,

“Barua”,

“Kamal”,

“jamil”

]

More about JavaScript:

UpperCase , LowerCase & replace of a tring by another can be found by mentioned way

console.log(‘Romel Barua Bakul’.toUpperCase()); // ROMEL BARUA BAKUL

console.log(‘Romel Barua Bakul’.toLowerCase()); // romel barua bakul

console.log(‘man and women’.replace(‘women’, ‘human’)) // man and human

Short circuit logic operation can be obtained by && and || operator.

Conditional operation can be found by

let age = 21

console.log( (age > 18) ? ‘voter’ : ‘non-voter’);

console.log( (age > 60) ? ‘Retired’ : ‘non-Retired’);

// voter

// non-Retired

SSL Introduction:

1. SSL terminology is mainly differentiating by http:// & https://. Where https:// means SSL certification. Extra “s” stands for secure

2. SSL means Secure Socket Layer. To secure a website we use SSL.

3. SSL is a private protocol to data transfer from web to the server so that no one can get the secure user information like password.

4. SSL is introduced by an encrypted link between browser & server.

5. There are different types of SSL certificate. Extended Validation (EV) SSL which shows padlock in browser address bar, Organized Validate (OV) SSL which shows small green padlock and Domain Validation (DV) SSL, Wildcare SSL certificate, Unified Communications (UCC) SSL certificate, Single Domain certificate.

--

--