function bang() {
try {
({}).a();
} catch(e) {
e.message = "Just thr" + "ow like this!";
(function* () {})()['thr' + 'ow'](e);
}
}
const count1 = [
num => (('' + num).match(/1/g) || []).length,
num => num.toString().replace(/[^1]/g, '').length,
num => `${num}`.split('').filter(d => !~-d).length,
num => [...String(num)].reduce((s, d) => s + (d == 1), 0),
num => ''.split.call(num, 1).length - 1,
];
const numbers = [
23489,
-11,
-93481,
7211231,
0,
123.321,
Infinity,
NaN,
];
count1.map(f => numbers.filter(n => f(n) === 2)).forEach(n => console.log(n));