UNPKG

same.js

Version:

A Class of Parallel Arrays Manipulation

10 lines (9 loc) 558 B
const { Same } = require("Same"); var same = new Same(); async function main() { same.insert(1, "one"); // same.insert(2, "two"); // inserts many values in the Same same.insert("uno", 1); // console.log(await same.has(1)); // checks if the Same has the value 1 and outputs an array of objects containing the index and the number of array where the value 1 is stored } main() // calls an async function (THE MODULE has() MUST BE AWAITED)