DEV Community

Dhanush N
Dhanush N

Posted on β€’ Edited on

14 4 1

Rarely known Javascript Tips

JavaScript is a dynamic computer programming language.

It is an interpreted programming language with object-oriented capabilities.


πŸ‘‡πŸ‘‡πŸ’‘Javascript Tips πŸ’‘πŸ‘‡πŸ‘‡

πŸ’‘ Javascript Tip 1️⃣

The bitwise OR operator can also be used to remove any amount of digits from the end of an integer.

Alt Text

πŸ’‘ Javascript Tip 2️⃣

The π˜€π˜π—Ώπ—Άπ—»π—΄π—Άπ—³π˜†() method takes two optional parameters:
πŸ‘‰ a replacer function, which you can use to filter the JSON that is displayed
πŸ‘‰ a space value

Alt Text

πŸ’‘ Javascript Tip 3️⃣

There is a very simple way to empty an array in Javascript:

Alt Text

πŸ’‘ Javascript Tip 4️⃣

We can await multiple async functions to finish by using Promise.all

Alt Text

πŸ’‘ Javascript Tip 5️⃣

Javascript ES6 Concepts

πŸ‘‰ map()
πŸ‘‰ reduce()
πŸ‘‰ filter()

Interesting illustration πŸ‘‡

Alt Text

πŸ’‘ Javascript Tip 6️⃣

Short circuit conditionals

Alt Text

Note : Will be updating this post further

Alt Text

To get to know more technical stuff, connect with me via Twitter

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

Top comments (4)

Collapse
 
agiesey profile image
AGiesey β€’

I love the map(), filter(), reduce() image. reduce makes a fruit salad, lol

Collapse
 
shadowtime2000 profile image
shadowtime2000 β€’

most of these rarely known tips are actually pretty known tips except for the first one. I did like the es6 array function fruit chart tho.

Collapse
 
asifurrahamanofficial profile image
Asifur Rahaman β€’

change no.3 tip image

Collapse
 
dhanushnehru profile image
Dhanush N β€’

Thanks πŸ™‚πŸ‘ Done

SurveyJS custom survey software

JavaScript UI Library for Surveys and Forms

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

View demo

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay