Explain Codes LogoExplain Codes Logo

Javascript

Write / add data in JSON file using Node.js

javascript
file-handling
error-handling
asynchronous-operations

With ng-bind-html-unsafe removed, how do I inject HTML?

javascript
angularjs
html-injection
security-best-practices

With a browser, how do I know which decimal separator the operating system uses?

javascript
cross-browser-compatibility
locale-preferences
decimal-separator

Window.location.href and window.open() methods in JavaScript

javascript
window-location-href
window-open-methods
browser-history

Window is not defined in Next.js React app

javascript
window-access
next-js
ssr

Why is useState not triggering re-render?

javascript
react-state-management
functional-updates
immutability

Why is the result of ('b'+'a'+ + 'a' + 'a').toLowerCase() 'banana'?

javascript
type-coercion
operator-precedence
unary-plus

Why is there no logical XOR?

javascript
logical-operators
bitwise-xor
short-circuiting

Why is the first element always blank in my Rails multi-select, using an embedded array?

javascript
form-submissions
rails-behavior
validation-filter

Why is my .data() function returning [ instead of the first value of my array?

javascript
json-parsing
jquery-data
javascript-best-practices

Why is immutability so important (or needed) in JavaScript?

javascript
immutability
const
pure-functions

Why Is `Export Default Const` Invalid?

javascript
export-default
named-exports
javascript-modules

Why doesn't indexOf work on an array IE8?

javascript
polyfills
ie8-compatibility
javascript-features

Why does Date.parse give incorrect results?

javascript
date-parsing
javascript-standards
best-practices

Why does a RegExp with global flag give wrong results?

javascript
regex-patterns
global-flag
lastindex-management

Why does an ES6 React component work only with "export default"?

javascript
import-syntax
export-default
react-components

When do you use map vs flatMap in RxJava?

javascript
rxjava
observable
error-handling

What underlies this JavaScript idiom: var self = this?

javascript
closure
this-keyword
event-driven-programming

What's the scoop on String.slice vs String.substring?

javascript
string-methods
negative-parameters
substring-vs-slice

What's the effect of adding 'return false' to a click event listener?

javascript
event-propagation
default-behavior
preventdefault