Explain Codes LogoExplain Codes Logo

Javascript

How can I detect changes in location hash?

javascript
hashchange
ajax
performance

Using jQuery to test if an input has focus

javascript
jquery
focus
accessibility

Wait 5 seconds before executing next line

javascript
async-await
promises
nodejs

Adding a table row in jQuery

javascript
jquery
dom-manipulation
dynamic-content

How to sort in mongoose?

javascript
mongoose
sorting
pagination

How can I add a class to a DOM element in JavaScript?

javascript
classlist
dom-manipulation
best-practices

How to close current tab in a browser window?

javascript
window-close
user-confirmation
custom-modal

How to get a file or blob from an object URL?

javascript
fetch
blob
file-download

Best way to find if an item is in a JavaScript array?

javascript
array-methods
performance
polyfills

React js onClick can't pass value to method

javascript
onclick
performance
event-handling

How do I check that a number is float or integer?

javascript
number-check
type-detection
polyfill

How do I measure the execution time of JavaScript code with callbacks?

javascript
callbacks
performance
async-await

Vue.js dynamic images not working with webpack

javascript
dynamic-images
webpack
vuex

How to detect escape key press?

javascript
escape-key
event-handling
cross-browser

How can I extract a number from a string in JavaScript?

javascript
regex
string-manipulation
parseint

How to find event listeners on a DOM node in JavaScript or in debugging?

javascript
event-listeners
performance
debugging

Sort array of objects by string property value

javascript
sorting
case-insensitive
dynamic-sort

How do you check that a number is NaN in JavaScript?

javascript
nan
ecmascript
polyfill

How do I add a delay in a JavaScript loop?

javascript
settimeout
async-await
deferred-callbacks

How to subtract days from a plain Date?

javascript
date-manipulation
time-zones
momentjs