python jargon

Jargon differences in JavaScript

While doing a coding challenge for a job application, I ran into an issue where jargon from other languages were used that I was unfamiliar with.

Segment:

In Python, it’s called a segment but in JavaScript, it’s a slice. If asked about a segment, it’s asking about a sliced section of an Array, string, Typed Array or NodeList.

Vector/List:

In Python, arrays are most commonly referred to as lists but can also be referred to as ‘Vectors’

“Heaps and Hashmaps/Dictionaries”

Heaps are a special type of tree that doesn’t exist in JavaScript. Hashmaps are essentially Javascript Objects.

Tuples

In python, tuples are ordered, immutable collections of elements that JavaScript doesn’t have a counterpart for.

def

Probably not super helpful but to define a function, ‘def’ is used in Python.

There are other differences but these seemed to be the most relevant.