Explain Codes LogoExplain Codes Logo

Javascript

How to interpolate variables in strings in JavaScript, without concatenation?

javascript
template-literals
string-interpolation
es6-features

Implode an array with JavaScript?

javascript
join
array-manipulation
string-operations

How to get the focused element with jQuery?

javascript
focus-detection
jquery
browser-behaviors

Mocha / Chai expect.to.throw not catching thrown errors

javascript
async-debugging
error-testing
mocha-chai

Ios JavaScript bridge

javascript
javascript-bridge
web-development
performance

Get data from fs.readFile

javascript
async-programming
callbacks
promises

Rails order by association field

javascript
promises
callbacks
arel

Set type for function parameters?

javascript
type-checking
javascript-features
best-practices

Get JavaScript object from array of objects by value of property

javascript
array-methods
filter
find

How to measure time taken by a function to execute

javascript
performance
timing
functions

Syntax for an async arrow function

javascript
async-functions
promises
await

How to check if a function exists in JavaScript?

javascript
function-existence
optional-chaining
eval-safety

How to create an array containing 1...N

javascript
array-initialization
javascript-arrays
performance-optimization

How can I get all a form's values that would be submitted without submitting

javascript
form-data
ajax-requests
event-listeners

Fastest way to copy a file in Node.js

javascript
streaming
promises
async-await

Is there a JavaScript function that can pad a string to get to a determined length?

javascript
string-manipulation
polyfill
performance-optimization

How to Convert an HTMLElement to a String

javascript
serialization
xmlserializer
xss-prevention

How do I use namespaces with TypeScript external modules?

javascript
module-exports
typescript-modules
namespace-management

Check if any ancestor has a class using jQuery

javascript
jquery-methods
dom-traversal
javascript-performance

How do I clear the content of a div using JavaScript?

javascript
event-listeners
dom-manipulation
javascript-magic