Explain Codes LogoExplain Codes Logo

Javascript

How do you use a variable in a regular expression?

javascript
regex
dynamic-patterns
input-validation

Losing scope when using ng-include

javascript
ng-include
scope-inheritance
best-practices

Read a file one line at a time in node.js?

javascript
file-handling
asynchronous
error-handling

How to stop JavaScript forEach?

javascript
for-loop
array-methods
performance

Check if a value is an object in JavaScript

javascript
object-checking
type-detection
libraries

How to check if a string "StartsWith" another string?

javascript
starts-with
polyfill
performance

Loop (for each) over an array in JavaScript

javascript
for-of
async-await
array-methods

Convert a JavaScript string in dot notation into an object reference

javascript
object-manipulation
lodash
error-management

How do I debug Node.js applications?

javascript
debugging
nodejs
performance

Shortest way to print current year in a website

javascript
dynamic-content
cross-browser
server-side

Javascript variable number of arguments to function

javascript
arguments
default-parameters
spread-operator

Using async/await with a forEach loop

javascript
async-await
promise-all
for-await-of

How can I add new array elements at the beginning of an array in JavaScript?

javascript
array-manipulation
performance
best-practices

Trim string in JavaScript

javascript
trim
polyfill
regex

How to do associative array/hashing in JavaScript

javascript
associative-array
map
json

How do I get the current date in JavaScript?

javascript
date-formatting
cross-browser
locale-specific

Get the size of the screen, current web page and browser window

javascript
responsive-design
cross-browser
jquery

How do I check if an object has a key in JavaScript?

javascript
key-checks
object-properties
es2020

Javascript set object key by variable

javascript
dynamic-keys
es6
object-literal

Check if checkbox is checked with jQuery

javascript
jquery
checkbox
event-delegation