same.js
Version:
A Class of Parallel Arrays Manipulation
6 lines (4 loc) • 370 B
JavaScript
const { Same } = require("Same");
var same = new Same();
same.insert(1, "one"); // inserts 1 in the first array and "one" in the second array
console.log(same.over(1) + "\n" + same.over("one")); // outputs the overwritten element for the index of the value 1 and the overwritten element for the index of the value "one"