1function relDiff(a, b) {
2 return 100 * Math.abs( ( a - b ) / ( (a+b)/2 ) );
3}
4// example
5relDiff(11240, 11192); //=> 0.42796005706134094
6
1function oddNumbers(l, r) {
2 let arr = [];
3 while (l <= r) {
4 arr.push(l);
5 l += 1;
6 };
7 return arr.filter(n => n % 2);
8}