Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Importing packages

import {Tuple} from "js-datastruct"

Tuple

const tuple = new Tuple(1, 2, 3)

tuple[0] = 2

console.log(tuple[0]) //-> 2

tuple[4] = 3; //-> RangeError: The last index of the tuple is 2

tuple[4]; //-> RangeError: The last index of the tuple is 2

Tuple works with many array inbuilt methods, but not with push, pop, unshift, shift

tuple.push(3) //-> TypeError: Invalid method. Tuple can't change its length

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages