Collage Application Question

by Andrew Gerst

HTML

Collage Application Question

JavaScript

let x = 2;
let y = 8;
const a = function(b) {
  return function(c) {
    return x + y + Math.abs(b) + c;
  }; 
};

// Statement will go here
y = 4;

const fn = a(x);
x = 4;
console.log(fn(Math.random() * 10));
for (var i = 0; i < 100; i++) {
	let ans = fn(Math.random() * 10);
  if (ans < 10 || ans > 20) console.log(ans);
}