Explain Codes LogoExplain Codes Logo

Javascript

Belongsto vs hasMany in Sequelize.js

javascript
sequelize
database-structure
relationships

Getting a random value from a JavaScript array

javascript
randomness
lodash
prototype

How to open a select file dialog via js?

javascript
file-reader-api
file-input
javascript-features

How to scroll to specific item using jQuery?

javascript
scrolling
jquery
javascript-alternatives

Queryselector and querySelectorAll vs getElementsByClassName and getElementById in JavaScript

javascript
performance
best-practices
dom-manipulation

Node.js global variables

javascript
global-variables
node-js
dependency-injection

How to filter input type="file" dialog by specific file type?

javascript
file-input
javascript-validation
client-side-validation

Set active tab style with AngularJS

javascript
promises
callbacks
directive

How to calculate the number of days between two dates?

javascript
date-objects
time-zones
date-formatting

Truncate number to two decimal places without rounding

javascript
functions
math
truncation

Is there a better way of writing v = (v == 0 ? 1 : 0);

javascript
toggle-techniques
best-practices
javascript-operators

How to find a parent with a known class in jQuery?

javascript
jquery
dom-manipulation
selectors

Resource interpreted as Script but transferred with MIME type text/plain - for local file

javascript
mime-type
local-development
server-configuration

How can I add a custom HTTP header to an ajax request with javascript or jQuery?

javascript
ajax
headers
javascript-requests

Implement a loading indicator for a jQuery AJAX call

javascript
ajax
loading-indicator
jquery

Correct way to convert size in bytes to KB, MB, GB in JavaScript

javascript
prompt-engineering
functions
performance

How do you get the cursor position in a textarea?

javascript
cursor-position
textarea
selection-start

Uncaught TypeError: Cannot read property 'top' of undefined

javascript
prompt-engineering
functions
callbacks

Calling webpacked code from outside (HTML script tag)

javascript
webpack
promises
es6-syntax

How do you stop Prettier in VS code splitting attributes onto multiple lines?

javascript
best-practices
formatting
prettier