All files / 2_Function/2_Nested ArrowFunction.js

33.33% Statements 25/75
0% Branches 0/10
1.96% Functions 1/51
45.45% Lines 25/55
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106    1x     1x         1x     1x     1x             1x     1x         1x     1x     1x             1x     1x         1x     1x     1x             1x     1x         1x     1x     1x             1x     1x         1x     1x     1x          
export default function() {
  // No argument
  const arrowFunction01 = () => {
    return () => { return "foo"; };
  }
  const arrowFunction02 = () => {
    return () => {
      return "foo";
    };
  }
  const arrowFunction03 = () => {
    return () => "foo";
  }
  const arrowFunction04 = () => {
    return () => ({ foo: "bar" });
  }
  const arrowFunction05 = () => {
    return () => ({
      foo: "bar"
    });
  }
 
  // Single argument without parenthesis
  const arrowFunction11 = () => {
    return foo => { return "foo"; };
  }
  const arrowFunction12 = () => {
    return foo => {
      return "foo";
    };
  }
  const arrowFunction13 = () => {
    return foo => "foo";
  }
  const arrowFunction14 = () => {
    return foo => ({ foo: "bar" });
  }
  const arrowFunction15 = () => {
    return foo => ({
      foo: "bar"
    });
  }
 
  // Single argument with parenthesis
  const arrowFunction21 = () => {
    return (foo) => { return "foo"; };
  }
  const arrowFunction22 = () => {
    return (foo) => {
      return "foo";
    };
  }
  const arrowFunction23 = () => {
    return (foo) => "foo";
  }
  const arrowFunction24 = () => {
    return (foo) => ({ foo: "bar" });
  }
  const arrowFunction25 = () => {
    return (foo) => ({
      foo: "bar"
    });
  }
 
  // Multiple arguments
  const arrowFunction31 = () => {
    return (foo, bar) => { return "foo"; };
  }
  const arrowFunction32 = () => {
    return (foo, bar) => {
      return "foo";
    };
  }
  const arrowFunction33 = () => {
    return (foo, bar) => "foo";
  }
  const arrowFunction34 = () => {
    return (foo, bar) => ({ foo: "bar" });
  }
  const arrowFunction35 = () => {
    return (foo, bar) => ({
      foo: "bar"
    });
  }
 
  // Arguments with default values
  const arrowFunction41 = () => {
    return (foo = "=>", bar = "()") => { return "foo"; };
  }
  const arrowFunction42 = () => {
    return (foo = "=>", bar = "()") => {
      return "foo";
    };
  }
  const arrowFunction43 = () => {
    return (foo = "=>", bar = "()") => "foo";
  }
  const arrowFunction44 = () => {
    return (foo = "=>", bar = "()") => ({ foo: "bar" });
  }
  const arrowFunction45 = () => {
    return (foo = "=>", bar = "()") => ({
      foo: "bar"
    });
  }
};