Explain Codes LogoExplain Codes Logo

Javascript

How do I format a date in JavaScript?

javascript
date-formatting
locale-strings
date-extraction

How to replace all dots in a string using JavaScript

javascript
regex
string-manipulation
javascript-functions

Convert form data to JavaScript object with jQuery

javascript
prompt-engineering
functions
callbacks

Why does instanceof return false for some literals?

javascript
instanceof
javascript-types
type-checking

What is the most efficient way to deep clone an object in JavaScript?

javascript
clone-engineering
performance
best-practices

Object comparison in JavaScript

javascript
object-comparison
javascript-basics
deep-equality

Clearing all cookies with JavaScript

javascript
cookie-engineering
javascript-techniques
browser-compatibility

Setting a backgroundImage With React Inline Styles

javascript
react
webpack
es6

Looping through localStorage in HTML5 and JavaScript

javascript
localStorage
serialization
deserialization

Get all non-unique values (i.e.: duplicate/more than one occurrence) in an array

javascript
prompt-engineering
performance
best-practices

Should I use encodeURI or encodeURIComponent for encoding URLs?

javascript
url-encoding
security-best-practices
javascript-functions

Insert a string at a specific index

javascript
string-manipulation
prototype-methods
code-reusability

$(document).ready equivalent without jQuery

javascript
dom-readiness
vanilla-js
javascript-optimizations

How to filter object array based on attributes?

javascript
filter
array
javascript-8

How can I validate an email address in JavaScript?

javascript
regex
email-validation
javascript-regex

How to replace plain URLs with links?

javascript
linkification
url-parsing
regex

Query-string encoding of a JavaScript object

javascript
prompt-engineering
functions
recursion

Selecting element by data attribute with jQuery

javascript
prompt-engineering
best-practices
performance

Convert relative path to absolute using JavaScript

javascript
prompt-engineering
functions
callbacks

How to update nested state properties in React

javascript
react
immutability
state-management