I am Software Developer, currently interested in static type languages (TypeScript, Elm, ReScript) mostly in the frontend land, but working actively in Python also. I am available for mentoring.
Tuple is not Array in general definition. Tuple is implemented as Array in JS as there is no Tuple in the language. In Python(and many other) for example tuple syntax is different - tuple = (1,2) and array is arr = [1,2]. The title of this article is misleading.
Thank you for pointing out. I have changed the title and included Typescript as well. This article is written in context of Typescript. Yes other languages like Python have different syntax. But in Typescript we have this syntax for now. As @urielsouza29
pointed out we have already a proposal for native support for Tuple in Javascript which will have a different syntax.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Tuple is not Array in general definition. Tuple is implemented as Array in JS as there is no Tuple in the language. In Python(and many other) for example tuple syntax is different -
tuple = (1,2)
and array isarr = [1,2]
. The title of this article is misleading.Thank you for pointing out. I have changed the title and included Typescript as well. This article is written in context of Typescript. Yes other languages like Python have different syntax. But in Typescript we have this syntax for now. As @urielsouza29 pointed out we have already a proposal for native support for Tuple in Javascript which will have a different syntax.