Skip to content

Instantly share code, notes, and snippets.

@ashnur
Created January 21, 2020 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashnur/b5da0c3692ae64fd9c6d7c1012acaf1d to your computer and use it in GitHub Desktop.
Save ashnur/b5da0c3692ae64fd9c6d7c1012acaf1d to your computer and use it in GitHub Desktop.
Does this request make sense?
Write one Javascript statement on the indicated line that will make the printed number always be between 10 and 20 *
let x = 2;
let y = 8;
const a = function(b) { return function(c) { return x + y + Math.abs(b) + c; } };
// Statement will go here
const fn = a(x);
x = 4;
console.log(fn(Math.random() * 10));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment