Random Topic about JavaScript.
- Why some website’s URL built http and why some are built with https?
Let’s explain about it : I am sure that some of you already noticed that when you visit any website and when you see in the top I mean when you see at the URL you will notice some URL start with http and some are start with https why this difference this is happen just when you visit some sensitive website like as, you have to pay for somethings in the website in this case it is so much secure information so that’s kinds of website’s URL made with a extra “S” this “s” means SSL which full from is Secure Sockets Layer its wrap your sensitive information and encrypted them and make a connection with server and website.
2. Let’s make a relation between you and JavaScript with easy way by my word.
By Working with JavaScript for a long time I learn that JavaScript are have some key topic and if you become familiar with these topics you have to familiar with JavaScript too. Let’s talk about this,
· Number
· Strings
· Boolean
· Function
· Objects
· Symbol
· Array
· Data
· Es6
· Null
· Undefine
I recommended you if you want to take the taste of JavaScript then don’t ruined your time go and start work with them.
3. What is parseFloat( )?
ParseFloat is used when we provide a number as a strings like “10” but we want to add them with a number like 20 in this case we have to give up the quotation marks other wise our result will show NaN for this reason we have to use parseFloat before “10” because it will remove the quotation marks and make the data as a number.
Here is some example.
parseFloat(“10”) = 10
parseFloat(“12.34”) = 12.44
parseFloat(“ 10 ”) = 10
parseFloat(“0.45”) = 0.45
4. What is parseFloat( )?
Now its time to talk about parseInt. It also work for the conversation from strings to number the difference between perseFloat and parseInt is pareFloat can give you actual data if you push “12.34” it will give you 12.34 but in parseInt function if you give “12.34” it will return you 12 because it just return you integer type value.
Here is some example.
parseInt(“10”) = 10
parseInt (“12.34”) = 12
parseInt (“ 10.56 ”) = 10
parseInt (“0.45”) = 0
Get Mehedi Hassan Sagor’s stories in your inbox
Join Medium for free to get updates from this writer.
5. Let’s talk about NaN.
NaN stands for not a number .Usually you see it where you want to push number unfortunately you push there a strings. Let’s clear you more, you have to learn legal or illegal number, then what is it
Suppose you post 4,5,6,7,7/9 they are legal number because they have exists .But if you push like 12+re = ? ,56/yuye = ? then what will be the result in normal sense we can say there is no result value in that case the out of JavaScript code give you NaN value.
6. Array
Before talk about array we have to learn what is an array. Array is a collection of items which stored in a single value. When we want to work with multiple value in a code then we have to declare array. You have to take it mind that array can store just same kinds of value. Like if you want to declare numbers you have to provide every item in number.in JavaScript arrays use in a large number.
It is defined as ,
const student = [“sagor”,”Tonny”,”Mehedi”,”hassan”,”sagor”]:
const number = [23,34,54,67,87,90]
const studentInfo = [{name:sagor,roll:12,result:A+}, {name:hassan,roll:32,result:B+}]
7. Let’s talk about concat( ) and join( )
I am going to introduce with you about concat by a simple example.
Let’s we have two array
Const a = [“hassan”,”rafi”,”rofique”] and Const b = [“sokina”.”jorina”,”morgina:]
Now we want to add those two array so how do we do that in this time concat help you to add those array.
If we write like
c=a.concat(b) then it will push all data that store in in b into the array a
now its time to talk about join, if you want to add all data in array like you have [“mehedi”,”hassan”,”sagor”] into [mehedi-hassan-sagor] like that then you have to work with join( ) method.
8. JavaScript Math max( )
When we declare an array and we want to sort out the maximum property from the array in that case max( ) property make out work so much easier. Just by this one function we can find out the maximum value from an array.
Const a = [12,34,54,67,22]
Math.max(a)= 67
9.JavaScript Math min( )
When we declare an array and we want to sort out the minimum property from the array in that case min( )property make out work so much easier. Just by this one function we can find out the minimum value from an array.
Const a = [12,34,54,67,22]
Math.min( ) = 12.
10. about JavaScript floor method.
The floor method truned the number into down word such as you have a number like 12.34 if you operate floor method then you got the output 12.
Example :
Math.floor(12.34) = 12
Math.floor(32.56) = 32
Math.floor(56.89) = 56
Math.floor(0.45) = 0





