Explain Codes LogoExplain Codes Logo

Javascript

How do I convert an array of Objects into one Object in JavaScript?

javascript
reduce
performance
object-merging

Sort array by firstname (alphabetically) in JavaScript

javascript
sorting
localecompare
array-methods

How to add/update an attribute to an HTML element using JavaScript?

javascript
attribute-manipulation
cross-browser
jquery

Get current URL with jQuery?

javascript
url-manipulation
jquery
history-api

Get selected text from a drop-down list (select box) using jQuery

javascript
dropdown
jquery
best-practices

How can I get the index of an object by its property in JavaScript?

javascript
find-index
method-chaining
browser-support

Programmatically navigate using React router

javascript
react-router
navigation
hooks

Inserting HTML elements with JavaScript

javascript
html-insertion
document-fragment
template-management

Get list of data-* attributes using JavaScript / jQuery

javascript
data-attributes
performance
jquery

Get viewport/window height in ReactJS

javascript
responsive-design
custom-hooks
event-listener

Adding two numbers concatenates them instead of calculating the sum

javascript
type-conversion
input-validation
parseint

How to wait until an element exists?

javascript
async-await
mutation-observer
element-detection

Getting JavaScript object key list

javascript
object-manipulation
keys
underscore

Send response to all clients except sender

javascript
socket-io
broadcasting
error-handling

Typescript: problems with type system

javascript
type-system
canvas-api
dynamic-properties

How to insert an item into an array at a specific index (JavaScript)

javascript
array-insertion
method-chaining
performance

How to Set Input Type Date's Default Value to Today?

javascript
input-type
date-formatting
jquery

What does "javascript:void(0)" mean?

javascript
void-operator
accessibility
user-experience

Preloading images with jQuery

javascript
image-preloading
error-handling
ajax-callbacks

How can I check if an object is an array?

javascript
array-checking
performance
polyfill