// Arrow function filter((element) => { ... } ) filter((element, index) => { ... } ) filter((element, index, array) => { ... } ) // Callback function filter(callbackFn) filter(callbackFn, thisArg) // Inline callback function filter(function callbackFn(element) { ... }) filter(function callbackFn(element, index) { ... }) filter(function callbackFn(element, index, array){ ... }) filter(function callbackFn(element, index, array) { ... }, thisArg)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter