Explain Codes LogoExplain Codes Logo

Javascript

What is the difference between "let" and "var"?

javascript
hoisting
temporal-dead-zone
javascript-features

How do I split a string, breaking at a particular character?

javascript
destructuring
array-destructuring
regular-expressions

How to set NODE_ENV to production/development in OS X

javascript
environment-variables
nodejs
npm-scripts

Javascript code to stop form submission

javascript
form-validation
event-listeners
cross-browser-compatibility

How to convert an array into an object?

javascript
reduce
array-to-object
javascript-features

How to find the first element of an array matching a boolean condition in JavaScript?

javascript
prompt-engineering
functions
callbacks

How to get the anchor from the URL using jQuery?

javascript
prompt-engineering
functions
callbacks

What is the !! (not not) operator in JavaScript?

javascript
prompt-engineering
best-practices
performance

Subject vs BehaviorSubject vs ReplaySubject in Angular

javascript
subject-engineering
angular
state-management

What's the best way to detect a 'touch screen' device using JavaScript?

javascript
touch-events
pointer-events
modernizr

What is the correct way to check for string equality in JavaScript?

javascript
equality-checking
javascript-operators
best-practices

How to fill the whole canvas with specific color?

javascript
canvas
javascript-style-properties
web-development

How can I insert a line break into a <Text> component in React Native?

javascript
react-native
template-literals
text-component

How to detect a mobile device with JavaScript?

javascript
responsive-design
mobile-device-detection
user-agent

Determine whether an array contains a value

javascript
array-methods
performance-optimization
best-practices

Jquery Data vs Attr?

javascript
prompt-engineering
best-practices
data-attributes

Can I mark a field invalid from JavaScript?

javascript
validation
client-side
server-side

How do I get the coordinates of a mouse click on a canvas element?

javascript
event-handling
canvas
coordinates

Split large string in n-size chunks in JavaScript

javascript
prompt-engineering
performance
best-practices

How can I capitalize the first letter of each word in a string using JavaScript?

javascript
functions
regex
best-practices