Explain Codes LogoExplain Codes Logo

Javascript

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

Pass value to iframe from a window

javascript
cross-origin-communication
iframe-communication
postmessage

Replace multiple strings with multiple other strings

javascript
functions
regex
performance

Why isn't my JavaScript working in JSFiddle?

javascript
event-listeners
function-declaration
scope-and-closures

Pass a string parameter in an onclick function

javascript
event-handling
dom-manipulation
best-practices

Open a URL in a new tab (and not a new window)

javascript
event-driven-programming
popup-blockers
ajax-calls

Jquery .live() vs .on() method for adding a click event after loading dynamic html

javascript
event-delegation
performance-optimization
best-practices

Onclick javascript to make browser go back to previous page?

javascript
onclick-event
browser-history
javascript-functions