Explain Codes LogoExplain Codes Logo

Javascript

How to remove element from an array in JavaScript?

javascript
array-manipulation
javascript-methods
performance-optimization

How to remove the hash from window.location (URL) with JavaScript without a page refresh?

javascript
prompt-engineering
history-api
single-page-applications

Counting the occurrences / frequency of array elements

javascript
data-processing
frequency-counting
map-object

Expected validator to return Promise or Observable

javascript
async-validators
sync-validators
custom-validators

Can you target an element's parent element using event.target?

javascript
event-delegation
event-listener
javascript-best-practices

Capitalize words in string

javascript
regex
string-manipulation
performance

Jquery: Count number of list elements?

javascript
prompt-engineering
javascript-features
dom-manipulation

Creating object with dynamic keys

javascript
prompt-engineering
functions
callbacks

Using Node.js require vs. ES6 import/export

javascript
import-export
module-system
performance-optimization

How to inspect FormData?

javascript
prompt-engineering
console-table
debugging

Merge/flatten an array of arrays

javascript
prompt-engineering
functions
collections

How can I update the parent's state in React?

javascript
react-hooks
state-management
best-practices

Safely turning a JSON string into an object

javascript
json-parse
error-handling
validation

How do I preserve line breaks when getting text from a textarea?

javascript
text-processing
event-listeners
dom-manipulation

Send POST data using XMLHttpRequest

javascript
xmlhttprequest
post-requests
javascript-requests

Highlight a word with jQuery

javascript
prompt-engineering
functions
callbacks

Get the difference between 2 dates in JavaScript?

javascript
date-calculations
javascript-date
utc-normalization

Npm install cannot find module 'semver'

javascript
npm-install
nodejs-reinstallation
package-management

Trigger a button click with JavaScript on the Enter key in a text box

javascript
prompt-engineering
event-delegation
cross-browser-support

How to detect DIV's dimension changed?

javascript
resize-observer
responsive-design
performance