Advertisement
borsha06

js_p17

Apr 26th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function value(v)
  2. {
  3.     if(v>19)
  4.         return 2*Math.abs(v-19);
  5.     else
  6.         return 19-v;
  7. }
  8. console.log(value(77));
  9. console.log(value(7));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement