Skip to content
55

JS Tips

This is about useful JS tips!

12k stars777 forks80 entriesLast push Apr 26, 2025 (1 year ago)License GPL-3.0

This page lists names, links and short descriptions. The original list on GitHub is the source and belongs to its authors.

Support the community >Let’s keep in touch

Official Blog

In 2 lists

Official Twitter Account

Hubot

Slackbot

iOS App

Tips list

Check the reason make your page re-render by changed props and state

Hash maps without side effects

Adventurers Guide to React (Part I)

VueJS, How VueJS makes a copy-update-replace inside the data binding

Picking and rejecting object properties

Enhancing React components, Composition

Why you should use Object.is() in equality comparison

Recursion, iteration and tail calls in JS

State to Props maps with memory

Tapping for quick debugging

3 Array Hacks

Working With Websocket Timeout

Preventing Unwanted Scopes Creation in AngularJs

Binding objects to functions

Three useful hacks

ES6, var vs let

Breaking or continuing loop in functional programming

Comma operator in JS

Copy to Clipboard

Create an easy loop using an array

How to use optional arguments in functions (with optional callback)

Get File Extension

Return Values with the 'new' Operator

DOM event listening made easy

Helpful Console Logging Tricks

Easiest way to extract Unix timestamps

Reduce builtin function usage

Basics: Declarations

Detect document ready in pure JS

Calculate the Max/Min value from an array

Know the passing mechanism

Use destructuring in function parameters

Preventing Unapply Attacks

Array average and median

Using JSON.stringify

Advanced Properties

Flattening multidimensional Arrays

Deduplicate an Array

Observe DOM changes in extensions

Assignment Operators

Implementing asynchronous loop

Create Range 0...N easily using one line

Map() to the rescue: adding order to Object properties

Avoid modifying or passing arguments into other functions — it kills optimization

Converting truthy/falsy values to boolean

Speed up recursive functions with memoization

Currying vs partial application

Short circuit evaluation

Filtering and sorting a list of Strings

Using immediately invoked function expression

Use === instead of ==

Converting to number fast way

Empty an Array

Shuffle an Array

Return objects to enable chaining of functions

Safe String concatenation

Truncating the fast (but risky) way

Node.js: Run a module if it is not "required"

Passing arguments to callback functions

Even simpler way of using indexOf as a contains clause

Fat Arrow Functions #ES6

Measure performance of a code block

Pseudomandatory parameters in ES6 functions #ES6

Hoisting

Check if a property is in an Object

Template Strings

Converting a Node List to an Array

"use strict" and get lazy

Writing a single method for arrays and a single element

Differences between undefined and null

Sorting Strings with accented characters

Improve Nested Conditionals

ReactJS - Keys in children components are important

AngularJS: $digest vs $apply

Insert item inside an Array

See category
94

Awesome Rust

rust-unofficial/awesome-rust

A curated list of Rust code and resources.

Fresh★ 60k1833 entriesPushed today
94

Awesome Mac

jaywcjlove/awesome-mac

 This project is dedicated to collecting high-quality macOS software and organizing them systematically by different categories for easy search and use.

Fresh★ 115k1316 entriesPushed today
94

Awesome Python

vinta/awesome-python

Curated Python frameworks, libraries and resources.

Fresh★ 324k504 entriesPushed today
94

Awesome C++

fffaraz/awesome-cpp

A curated list of awesome C++ (or C) frameworks, libraries, resources, and shiny things. Inspired by awesome-... stuff.

Fresh★ 74k1358 entriesPushed yesterday
94

Awesome Go

avelino/awesome-go

Curated Go frameworks and libraries.

Fresh★ 186k3119 entriesPushed yesterday
94

Awesome PHP

ziadoz/awesome-php

A curated list of amazingly awesome PHP libraries, resources and shiny things.

Fresh★ 33k87 entriesPushed 2 days ago