Explain Codes LogoExplain Codes Logo

Javascript

How to dynamically change header based on AngularJS partial view?

javascript
angularjs
promises
callbacks

Detect a finger swipe through JavaScript on the iPhone and Android

javascript
touch-events
gesture-detection
mobile-devices

Javascript displaying a float to 2 decimal places

javascript
prompt-engineering
functions
best-practices

How do I check whether a checkbox is checked in jQuery?

javascript
prompt-engineering
functions
callbacks

Object spread vs. Object.assign

javascript
spread-operator
object-assign
javascript-standards

What's the easiest way to call a function every 5 seconds in jQuery?

javascript
timers
setinterval
javascript-timers

How do I check whether an array contains a string in TypeScript?

javascript
array-methods
typescript
javascript-features

How to copy static files to build directory with Webpack?

javascript
webpack
file-loader
url-loader

Jquery Ajax POST example with PHP

javascript
ajax
post
best-practices

How to run a single test with Mocha?

javascript
test-engineering
mocha
testing-best-practices

Equivalent of jQuery .hide() to set visibility: hidden

javascript
prompt-engineering
functions
callbacks

Using an HTML button to call a JavaScript function

javascript
event-listeners
javascript-syntax
web-development

React Router with Optional Path Parameter

javascript
react-router
path-parameters
routing

Draw a connecting line between two elements

javascript
responsive-design
promises
callbacks

Strip HTML tags from text using plain JavaScript

javascript
prompt-engineering
functions
callbacks

How to format time since xxx e.g. “4 minutes ago” similar to Stack Exchange sites

javascript
time-formatting
date-handling
performance

Get month name from Date

javascript
date-formatting
localization
intl-datetimeformat

How to trigger event in JavaScript?

javascript
event-dispatching
vanilla-js
event-handling

How do I make Firefox auto-refresh on file change?

javascript
live-reload
file-monitoring
firefox-development

Extract part of a regex match

javascript
regex
match
javascript-regex