There are many amazing features in javascript that can make your life much simpler, In this blog, I have added 20 features that every javascript developer should know.
1.Resize the Array using an array. length.
2.Swapping of two Numbers.
3 Concatenating two or more arrays without causing server overload.
4.Use Filter in a different way.
5.Iterate on the map from 0 to n.
6.Replace all occurrences of a word in a string
7.Shortcut for conditions.
Here, I am explaining basic two examples we can implement in multiple ways.
8.String to number / Number to string.
9.Use the console in different ways.
10.Use console.table
11.Get the items near to last index of an array.
12.Get n power of any number.
13.Check the falsy or truly value.
14.Call a function by its name stored in a string using eval function.
15.typeof Operator.
16.yeild keyword
17.function* in javascript.
18.new.target in javascript
19.label statement.
20.Rest parameters Syntax.
Conclusion:
Thanks for reading it, In this blog I have explained some of the most used features of javascript, I will explain more features in next blog,
Please give feedback in responses.
Top comments (8)
Donβt always learns something from these types of articles, but actually a few useful tricks in here. Thank you!
Thanks, I will try to give more detail information from next time.
thanks for this huge javascript blog!
Iβm just wondering, for the 3th, why donβt use the spread operator? Thatβs a bad impact on the memory too?
let array_a = [1, 2, 3]
let array_b = [4, 5, 6]
let array_a = [β¦array_a, β¦array_b]
Yes, Spread operator created a deep copy of object and shallow copy of its child in case of hierarchical objects.
I will create a separate blog for spread operator.
Good content and well explained. I like this kind of articles as they help the newcomer to learn and the advanced to remember. Thank you.
Welcome π.
Suggestion for 5, iterate.js : you can do [...Array(10).keys()].map(i=>i)
To avoid unused param your linter will whine about π
Yes we can.