Explain Codes LogoExplain Codes Logo

Javascript

How to merge two arrays in JavaScript and de-duplicate items

javascript
prompt-engineering
functions
callbacks

Append an element with fade in effect [jQuery]

javascript
method-chaining
animation
callbacks

How to add hours to a Date object?

javascript
date-prototype
custom-methods
immutability

Pass a JavaScript function as parameter

javascript
function-passing
callback-functions
async-programming

Submit form after calling e.preventDefault()

javascript
form-validation
event-handling
best-practices

Find the closest ancestor element that has a specific class

javascript
dom-traversal
polyfill
event-delegation

How do I find out which DOM element has the focus?

javascript
event-listeners
accessibility
focus-management

Jquery removeClass wildcard

javascript
prompt-engineering
functions
regular-expressions

How can I merge properties of two JavaScript objects dynamically?

javascript
object-merging
javascript-objects
polyfill

How to "fadeOut" & "remove" a div in jQuery?

javascript
event-handling
jquery-plugins
code-reusability

Any difference between await Promise.all() and multiple await?

javascript
async-programming
promise-all
performance-optimization

Check if a JavaScript string is a URL

javascript
url-validation
regex-patterns
url-encoding

How to build query string with Javascript

javascript
prompt-engineering
functions
encoding

What is the difference between "let" and "var"?

javascript
hoisting
temporal-dead-zone
javascript-features

How do I split a string, breaking at a particular character?

javascript
destructuring
array-destructuring
regular-expressions

How to set NODE_ENV to production/development in OS X

javascript
environment-variables
nodejs
npm-scripts

Javascript code to stop form submission

javascript
form-validation
event-listeners
cross-browser-compatibility

How to convert an array into an object?

javascript
reduce
array-to-object
javascript-features

How to find the first element of an array matching a boolean condition in JavaScript?

javascript
prompt-engineering
functions
callbacks

How to get the anchor from the URL using jQuery?

javascript
prompt-engineering
functions
callbacks