JavaScript JetPack

Minhajul Abedin Rahat
6 min readMay 5, 2021

1.Difference Between HTTP vs HTTPS

Hello, I hope you are doing well. If you are feeling bore then let’s make a drive on some interesting things.

I hope so many times you noticed that after visiting several websites, there are two types of URLs one is started with HTTP and another was started with HTTPS. I’m sure that after watching these two types of URLs you must ask your self wait what is that extra ‘S’ what does it mean. That ‘S’ means this site is secured from any other third party & encrypted. This ‘S’ means SSL which stands for “Secure Sockets Layer”. It works between the web server and browser. So whenever you visit any website where there is the URL starts with HTTP you should be careful about drop any kind of personal information because there are most chances to hack your personal data. So I recommend go with HTTPS to secure your personal data.

2. Different types of SSL

In the previous discussion you hear about what is SSL & what does it mean by the ‘S’ in an HTTPS URL. Now I would like to discuss different types of SSL.

I. Extended Validation (EV SSL) Certificate

This is the most expensive SSL certificate. If you want to get this for your business site to ensure your domain name authorization. This provides you HTTPS belong with your business name & business address. If you're on your site there are established payment systems & data collection systems then you should definitely go with that.

II.Organization Validated (OV SSL) Certificate

This certificate verifies that your organization & your domain name is real. If you want to get this OV SSL for your organization site you have to go through two steps. You have to prove that the owner of that domain is real & the organization runs legally. If you prove that you will get that OV SSL Certificate.

III.Domain Validation (DV SSL) Certificate

This provides a low-level encryption certificate. After getting this certificate you can see a green padlock next to your URL on the address bar. It’s easy to get this DV SSL for that you need to submit few company documents to apply.

IV.Wildcard SSL Certificates

This Wildcard SSL provides Security to your domain & also for your subdomains. For example, if your main domain is ‘school.com’ then your subdomain like ‘course.school.com’ also gets the wildcard SSL service.

V.Unified Communications (UCC) SSL Certificate

Unified Communications (UCC) SSL Certificate also known as Multi-domain SSL certificate.

VI.Single Domain SSL Certificate

Single Domain SSL Certificate secures only a single domain. It doesn’t protect the subdomain. For example, if any domain name is ‘book.com’ & its subdomain is ‘library.book.com’ not only protect the main domain like the first example not protect the second one.

3.Let’s Drive on ARRAY

Concat()

concat is a method that merges two arrays without changing the previous main array & it returns a new array.

concat() example

filter()

The filter is a method that returns an array that holds that element that fulfills the condition which matches the condition given inside the filter function. And how many elements match with the condition it will return them all.

find()

The find method returns the first value which satisfied the condition which is given inside the find method. Like you have an array

const array1 = [5, 12, 8, 130, 44];

now you want to find out which value is greater than 10 we will use for that find method like this way

const found = array1.find(element => element > 10);

and it will return you 12 though there are so many values exist on the Harry which is greater than 10 but find always return the first value which satisfied his condition. If no values satisfy the testing function, Undefined is returned.

findIndex()

The findIndex method is mostly similar to the find() method difference is it returns the index number of the satisfied element

indexOf()

The indexOf method returns the first index at which a given element can be found in the array, and it returns -1 if it’s not present there.

if you want to get the second bison then you should search it from the next of the first expected index like the given example

and if you enter any element that exists on the array then it will return you -1

4.It’s time to know about Push, Pop, Shift, & Unshift in a simple way

Push()

The push method is used on the array. Through this we can add an element to an array & that element will add just next to the last element of that array.

Pop()

The pop method is used on the array. Through this, we can delete an element from an array & that element will delete from the last index of that array.

Unsift()

Through this unshift method we can add one or more elements to an array & that element will add to the beginning of that array.

Shift()

Through this shift method, we can remove the first element of an array.

5.Let’s Know about Sort()

The sort method sorted an array in ascending order by default and return a sorted array

6. Reverse() Method

The reverse method reverses an array’s element

7.Let’s Look at some Number method

parseInt()

This parseInt function converts a string into a number

parseFloat()

The parseFloat() function helps to parses an argument and return a floating-point number

8.Let’ Look at Some Math function in JavaScript

Math.ceil()

The Math. ceil() round a fraction number into its just next largest number

Math.floor()

The Math. floor() round a fraction number into its just before less number

Math.abs()

The Math.abs always returns the absolute value.

const ceilNum = Math.abs(3–9)

console.log(ceilNum);

expected output will be 6

9.Let’s Look at on Some String trim Method

trim()

That trim() method helps to remove the white space of both side from a string

const greeting = ‘ Hello world! ‘;

console.log(greeting);

// expected output: “ Hello world! “;

console.log(greeting.trim());

// expected output: “Hello world!”;

trimEtart()

That trimStart() method helps to remove the white space from the beginning of a string

const greeting = ‘ Hello world! ‘;

console.log(greeting);

// expected output: “ Hello world! “;

console.log(greeting.trim());

//expected output: “Hello world “,

trimEnd()

That trimEnd() method helps to remove the white space from the end of a string

const greeting = ‘ Hello world! ‘;

console.log(greeting);

// expected output: “ Hello world! “;

console.log(greeting.trim());

//expected output: “ Hello world“,

10.Simply know about startsWith Method

This startsWith method helps to find out that the string begins with the specified character or not it returns boolean means true or false.

That’s all for today we will talk again very soon.

--

--

Minhajul Abedin Rahat
0 Followers

I'm so ambitious & determined about my goal & strongly believes in positivity.