Closures & Functions
Flip Function Arguments
easyJS SpecificJS / TS3 tests
Problem Statement
Implement `flip(fn)` that creates a function that invokes `fn` with its first two arguments reversed.
Examples
Example 1: const subtract = (a, b) => a - b; const flipped = flip(subtract); flipped(2, 5); // 5 - 2 = 3
JavaScript & TypeScript starter code included
Run this as a live interviewPractice solo
3 test cases. No second person needed.