Skip to content

Instantly share code, notes, and snippets.

View AlejandroPerezMartin's full-sized avatar
🇮🇨

Alejandro Pérez Martín AlejandroPerezMartin

🇮🇨
View GitHub Profile
const isRequired = () => { throw new Error('param is required'); };
function filterEvil(array, evil = isRequired()) {
return array.filter(item => item !== evil);
}