number-swapper
v1.0.5
Published
A simple npm module to swap two numbers
Downloads
7
Readme
number-swapper
A simple npm module to swap two numbers.
Installation
You can install the number-swapper
module using npm:
npm install number-swapper
Example
const swapNumbers = require('number-swapper');
const [a, b] = [5, 10];
const swapped = swapNumbers(a, b);
console.log(Original: a=${a}, b=${b}
);
console.log(Swapped: a=${swapped[0]}, b=${swapped[1]}
);