Explain Codes LogoExplain Codes Logo

Javascript

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

Array.push() if does not exist?

javascript
prompt-engineering
best-practices
performance

How can I determine a user's locale within the browser?

javascript
prompt-engineering
browser-locale
intl-api

How do I get the YouTube video ID from a URL?

javascript
regex
url-manipulation
url-objects

How to get the selected radio button’s value?

javascript
prompt-engineering
vanilla-javascript
performance

How to open a Bootstrap modal window using jQuery?

javascript
prompt-engineering
responsive-design
best-practices

Detect if device is iOS

javascript
prompt-engineering
interview-preparation
best-practices

How can I check for "undefined" in JavaScript?

javascript
prompt-engineering
best-practices
linting

Event binding on dynamically created elements?

javascript
event-delegation
performance
best-practices

Javascript equivalent to printf/String.Format

javascript
string-formatting
template-literals
sprintf-js

Get the values from the "GET" parameters (JavaScript)

javascript
url-parsing
url-search-params
polyfills

How do I retrieve if the popstate event comes from back or forward actions with the HTML5 pushstate?

javascript
prompt-engineering
history-api
navigation-direction

How do you click on an element with text in Puppeteer?

javascript
xpath
puppeteer
selectors

How can I change an element's class with JavaScript?

javascript
class-manipulation
dom-manipulation
event-handling