Explain Codes LogoExplain Codes Logo

Javascript

Window.onload vs document.onload

javascript
event-listeners
performance
best-practices

How to disable submit button once it has been clicked?

javascript
form-validation
button-states
javascript-events

Best way to store a key=>value array in JavaScript?

javascript
key-value-pairs
javascript-objects
es6-map

Disable button in angular with two conditions?

javascript
form-validation
angular
button-state

Moment.js transform to date object

javascript
momentjs
date-object
timezone

What do multiple arrow functions mean in JavaScript?

javascript
functional-programming
currying
arrow-functions

Convert a negative number to a positive one in JavaScript

javascript
functions
performance
best-practices

Get loop counter/index using for…of syntax in JavaScript

javascript
prompt-engineering
functions
callbacks

How to loop through a plain JavaScript object with the objects as members

javascript
prompt-engineering
functions
callbacks

How to get distinct values from an array of objects in JavaScript?

javascript
prompt-engineering
functions
callbacks

Best way to track onchange as-you-type in input type="text"?

javascript
event-handling
debouncing
input-event

Get decimal portion of a number with JavaScript

javascript
decimal-extraction
math-functions
precision-control

How to get the key of a key/value JavaScript object

javascript
prompt-engineering
functions
callbacks

Check if a number has a decimal place/is a whole number

javascript
prompt-engineering
functions
performance

Set custom HTML5 required field validation message

javascript
prompt-engineering
validation
html5

Copy array items into another array

javascript
array-operations
best-practices
javascript-techniques

How can I check if a string is a valid number?

javascript
prompt-engineering
interview-preparation
functions

Check if an element is present in an array

javascript
array-methods
performance-measures
polyfill

Define a global variable in a JavaScript function

javascript
javascript-best-practices
variable-scoping
global-variables

How to hide Bootstrap modal with javascript?

javascript
prompt-engineering
javascript
best-practices