Javascript 10 important thing now a days

Shaker Hossain
3 min readNov 5, 2020
  1. Truthy falsy

A truthy value is something which evaluates to true, for instance when checking a variable. There are many truthy values in javascript :-1, 1, " " {}, [] and true of course.

A falsy value is something which evaluates to false, for instance when checking a variable. There are only six falsey values in JavaScript: undefined, null, NaN, 0, "" and false of course.

2. Null vs undefined

Undefined : Undefined is also a primitive value in JavaScript. A variable or an object has an undefined value when no value is assigned before using it.

Null: Null as an assignment value. So you can assign the value null to any variable which basically means it’s blank. Null is object.

3. Double equal vs Triple Equal (== vs ===)

In javascript double equal just check value not type but triple equal check value and type.

4. Array split()

The split() method divides a string into an ordered list of substrings, puts these substrings into an array, and returns the array.

5. Array Slice()

The slice() method copy element from array and give new array but don’t remove slice element from old array.

6. Array Splice()

The splice() method cut element from array and give new array but remove cut element from old array.

7. Map() method in javascript.

The map() method creates a new array with the results of calling a function for every array element. The map() method calls the provided function once for each element in an array, in order

8. Filter() Method in javascript

Filtered method gives filtered element from from array. It is filtered by condition from array

9. Find() method in javascript

Find gives first element form array. Find method always give one element from array. Find by condition from array.

10. This keyword

This keyword use for access object property inside method in object.

--

--

Shaker Hossain
0 Followers

Engineer | Web Developer | Programmer