---
title: "Discussion on \"Top 5 Potent Javascript Tips and Tricks\" | Hashnode"
description: "Discussion on \"Top 5 Potent Javascript Tips and Tricks\". In this article, I’ll share five potent JavaScript tips, tricks, and best practices that I follow and found useful."
url: "https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Top 5 Potent Javascript Tips and Tricks](https://gayathridevisrinivasan.hashnode.dev/top-5-potent-javascript-tips-and-tricks?utm_source=hashnode&utm_medium=feed)

In this article, I’ll share five potent JavaScript tips, tricks, and best practices that I follow and found useful.

Aug 24, 2021 · 5 min read · gayathridevisrinivasan.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#programming-tips](https://hashnode.com/tag/programming-tips)
-   [#frontend-development](https://hashnode.com/tag/frontend-development)
-   [#developer](https://hashnode.com/tag/developer)

## Written by

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

@GayathrideviSrinivasan

  
[View profile](https://hashnode.com/@GayathrideviSrinivasan)

Mobile Engineer 💙 @Degreed| Tech Speaker 🎙| Techie Blogger 📝

I am a results-driven professional with a strong background in business development, strategic planning, and project management across both startups and established environments. Combining technical and leadership skills, I excel at leading cross-functional teams to deliver projects on time and identify new growth opportunities. Passionate about community building, I actively contribute to open-source projects and regularly deliver talks and hands-on sessions on Flutter and Dart.

## Responses 22

Markdown supported · ⌘↵ to post

[jeevitha g](https://hashnode.com/@Jeevithadev)

[Aug 31, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/612e47204e9d8114f8adee99)

This is so cool👍

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 31, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/612e47204e9d8114f8adee99#reply-612e4bee4e9d8114f8adf05b)

Thank you Jeevitha

[Talk to Grow - English](https://hashnode.com/@Talk2Grow-English)

[Aug 30, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/612c94adfd0bf8636d76f4f7)

Great article for beginners !

[Sanjeev Vishwakarma](https://hashnode.com/@Sanjeev92)

[Aug 28, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/612a8cabfd0bf8636d76c534)

Awesome article. Found it very useful. Feel free to write over High orde functions , closure , prototype and most importantly async / await . Waiting for positive response . Thanks

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 28, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/612a8cabfd0bf8636d76c534#reply-612aa1482858872661b9a159)

Feeling great and happy to receive your comments. Also thanks for the article suggestions sure you can expect articles on the same, very soon.

[Harsh Bharvada](https://hashnode.com/@harshbharvada)

[Aug 27, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6128e1a99da1766342ad640c)

Awesome content ⚡️! One can also add the following for getting floor values of **POSITIVE** numbers

```
let floorValue = ~~(3/2); //1
```

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 27, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6128e1a99da1766342ad640c#reply-612924959da1766342ad6cea)

Great tip to add to queue ! Thanks Harsh 🙂

[Gene](https://hashnode.com/@genelia)

[Aug 25, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/61260044663d427e19ffbe9e)

Which is faster between JavaScript and an ASP script?

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 25, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/61260044663d427e19ffbe9e#reply-61262b4bb115357df05f5d0b)

Javascript seems to be faster than ASP Script.

[Pawan](https://hashnode.com/@pawan731)

[Aug 25, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6125feacb115357df05f5800)

It's cool but not a big deal !!

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 25, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6125feacb115357df05f5800#reply-6126675471cb04254f06b9d3)

Sure, I will try to improve the content with some more complex topics.

[Prithi Velraj](https://hashnode.com/@Prithiv)

[Aug 25, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6125fd37663d427e19ffbdf0)

Post Array techniques and tips

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 25, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6125fd37663d427e19ffbdf0#reply-61262b20b115357df05f5d01)

Sure, Thank you Prithi

[Santhoshkumar Ramesh](https://hashnode.com/@Santhosh2kannan)

[Aug 25, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6125a2df663d427e19ffb536)

Good one👍

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 25, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6125a2df663d427e19ffb536#reply-6125d600663d427e19ffb90c)

Thank you

[karthik](https://hashnode.com/@gkarthik)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/61255525663d427e19ffb164)

Keep posting good content !!

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 25, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/61255525663d427e19ffb164#reply-6125d82e663d427e19ffb92a)

Sure, Thank you

[Darsh](https://hashnode.com/@Darsh23)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/612553efb115357df05f4b1e)

How i get the object.values ?

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 25, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/612553efb115357df05f4b1e#reply-6125d8fdb115357df05f533d)

You can directly get the object values using the method object.values(objectname) also check this once in console for better understanding.

[Aarov](https://hashnode.com/@Aarov)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/612552f6663d427e19ffb0f4)

How can I read the properties of an object in js?

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 25, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/612552f6663d427e19ffb0f4#reply-6125d9ac663d427e19ffb94f)

You can use either

Object.values(data) // \['bar', 'quux'\] Object.entries(data) // \[\['foo', 'bar'\], \['baz', 'quux'\]\]

also check this once in console for better understanding.

[Kaavya](https://hashnode.com/@kaavya)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/61254f5f663d427e19ffb09a)

Good Article

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 25, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/61254f5f663d427e19ffb09a#reply-6125d854663d427e19ffb930)

Thank you Kaavya

[Dev Anand](https://hashnode.com/@devanand)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/61251365663d427e19ffa988)

Very neatly conceived and found very useful ✌️ Kudos and keep up the good work!

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/61251365663d427e19ffa988#reply-61251f16663d427e19ffab47)

Thank you for your noteworthy comment 🙂

[Sumithra](https://hashnode.com/@Sumithra23)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124fe1b663d427e19ffa670)

Nice one keep posting !!

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124fe1b663d427e19ffa670#reply-61251f50b115357df05f457f)

Sure, Thank you for your valuable comment 🙂

[Aadarsh](https://hashnode.com/@aadarsh12)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124cb4db115357df05f3a81)

Passing arguments as objects methods explain ?

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124cb4db115357df05f3a81#reply-6124e9a4b115357df05f3e96)

You can use .bind() to pass the context. bind returns a function that when later executed will have the correct context set for calling the original function. This way you can maintain context in async callbacks, and events.Through this you can pass arguments as objects. Thanks for your comment Aadarsh.

[Dheerav](https://hashnode.com/@dheeravraj)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124c893663d427e19ff9f72)

Are you serious !! This is superb .

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124c893663d427e19ff9f72#reply-6124e850b115357df05f3e69)

Thank you Dheerav

[Varun Kumar](https://hashnode.com/@varunkumar)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124c730663d427e19ff9eb9)

Nice one ! But the content is less :-( In future eloborate the size of the articles in little bit more.

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124c730663d427e19ff9eb9#reply-6124e88c663d427e19ffa491)

Thanks Varun for your suggestion sure will correct them up and write an article in future.

[Bala](https://hashnode.com/@balagurusamy)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124c593b115357df05f3892)

Hello author !! this is really cool. Can you Explain what pure functions are and some of their advantages in the same manner ? Clear Explnation thank you ..

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124c593b115357df05f3892#reply-6124e7bab115357df05f3e48)

Thank you for your note worthy comment and valuable suggestion Bala, Sure will create an article on the same.

[amirta](https://hashnode.com/@amirtaaiyer)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124c439663d427e19ff9dbd)

I'm going to try out this Tricks !! Cheers :-)

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124c439663d427e19ff9dbd#reply-6124e841663d427e19ffa469)

Great to hear !! Feel free to share your suggestions once tried out.

[Jayaprakash](https://hashnode.com/@jayaprakashkiki)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124c32c663d427e19ff9d98)

Nic one

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124c32c663d427e19ff9d98#reply-6124e859663d427e19ffa46f)

Thank You

[Ravi Varma](https://hashnode.com/@ravi225)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124c1adb115357df05f37df)

Is this amazing !!! Can you share the Javascript Promises

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124c1adb115357df05f37df#reply-6124e81ab115357df05f3e5c)

Thank you for you note worthy comment. Sure will create one article on the same!!

[Anjali Sekar](https://hashnode.com/@AnjaliSekar)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124bd3a663d427e19ff9c64)

Can you write some article on javascript animations

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124bd3a663d427e19ff9c64#reply-6124e7cb663d427e19ffa461)

Yes Sure Anjali

[Jaishree](https://hashnode.com/@Jaishree)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124b8b2663d427e19ff9bb7)

Good content

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124b8b2663d427e19ff9bb7#reply-6124e7ddb115357df05f3e52)

Thank you

[PRiya Dharshini](https://hashnode.com/@Priyadhars49)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124b7b5b115357df05f35fe)

Do write articles on promises in JavaScript.

[Gayathri Devi Srinivasan](https://hashnode.com/@GayathrideviSrinivasan)

[Aug 24, 2021](https://hashnode.com/posts/top-5-potent-javascript-tips-and-tricks/6124b50d663d427e19ff9ac4/comment/6124b7b5b115357df05f35fe#reply-6124e771b115357df05f3e40)

Thank you for the comment Priya. Sure I will create an article on the same Stay tuned.
