JavaScript 10 Important Topic

Pappu Hasan
6 min readNov 5, 2020

Hi Today i will discuses 10 important topic for JavaScript conditionally result how to show and how many time you used condition so lets Start now

  1. Truth or False

we some time use true or false i think ur mind thin this is Boolean No its wrong because we now deferent way true or false example:

condition false

why result false because we show conditionally any value then 0 always false and other all true i will show some example

condition true

now i will show important screen short please see

if u thing this is empty string its not true look in the Dabble quitted and you will see a speech and speech mean its not empty than result show true if string empty than result show false

2.undifine or Null

many time some job interview question how many deferent undefined or Null so today i will Discuses This Subject Undefined some way to we find who is undefined or who is Null *Undefined first we variable declared but not set value than this is undefined exam:

undifined Function result

Uperline screen short show undefined because i can not return any value in function scope

because i can not set value 2 nd position mean p2 so result show undefined many more way to find undefined if u variable declared but value set undefined than show undefined result

  • Null basically many developer use some time null its mean var =null; this variable value empty than use it

3.(==) vs(===)

how many deferent (==) or(===) lets discuses now we basically == use justifying value two variable or When condition used then use it == equal mean value justifying true than next step going but not justifying the value string or number or Boolean but === justifying value type and next step going example Downline If we compare 2 with “2” using ===, then it will return a false value.

== Example

see Upperline screen short and u look we justifying 2 value one string or one number but result show true beacouse == only justifying value not type

=== example

result show false because === not only justify value this method justify value and value type than show result so result showing false

4.for loop

For loop is amazing system or method we some time calculate and use for loop some time we want any product price or count dabble then use for loop if u think its magic bot its not magic its working for loop yay

For Loop example

5.Map

Map this is not a google map its a JavaScript Functional map its work awesome and many time use it a developer for example lot off data storage one database then if u want to red data then use it actually i told similar in pattern deferent data than use map Downline example please see

6.Filter

how many time we need some system than we are three bother and filter small brother how can you find who is small its hard work and who is bigger than if u used filter and i hope you get exact result so let try to code and get result who is bigger or smaller

look 5 smaller 2 kinds 3 or 4 mean all smaller result show and exact way if u want to get bigger

yay its a amazing finally you get all bigger its awesome i hope you understand what was work filter

7.Find

find is a Filter Digital version mean find same work to filter but he is a lazy and we some time work lazy code and many time use this method because some position web app or mobile app need lazy style so then we use it why i told lazy because filter give you result if u want to see smaller than give you all smaller and if u want bigger then give you all bigger but find only return first bigger or return first smaller

5 bigger 6 then show 6

8.Array Max

many time we want largest element and many element find for example we use some condition waise result or alerts for example nana have tk=5lac and mama have tk =4 lac and nani have tk =9 lac who is bigger or rich man its simple told you nani is a reach man or bigger but you have lot of data or array how you find and told me that's a impossible but programming all possible now lets start

9.ArraySum

if you want to array value + than its easy some time use it its basically use card system mean payment system how many product added and how many price total price than you use it for example you are a user one online Shoping site then if u obviously ordered Product and payment so how mane tk payment vat or shipment cost or product price than use it one sentence told you a total price system

if u want use a function

10.Remove Duplicate Array Item

hi this subject awesome or very very important because for example you gived some food for free people then you collect name some people declarer to you you give some food for people then same smart people write her name 2 or 3 time than your beget failed and you are very uncomfortable so first your work find people who his name write 2 time and slice his 2 nd or 3rd name this mean duplicate array removed

output look example removed duplicate item

Thanks for read this Article

--

--