List Class
List
A more human way of handling array's in JavaScript. It provides some extra methods for manipulating an array, which makes it more easy and semantic such as when e.g. adding and removing elements using .Add() and .Remove().
Item Index
Methods
Add
-
An
Add
Add a new element - It's more semantic to use .Add() instead of .push().
Parameters:
-
AnObjectelement.
Returns:
The array.
Add
-
An
Add
Add a new element - It's more semantic to use .Add() instead of .push().
Parameters:
-
AnObjectelement.
Returns:
The array.
Clear
()
Clear
Remove all the elements from the array.
Clear
()
Clear
Remove all the elements from the array.
Contains
-
An
Contains
Check if the specified element is in the list
Parameters:
-
AnObjectelement.
Contains
-
An
Contains
Check if the specified element is in the list
Parameters:
-
AnObjectelement.
Get
-
A
Get
Get an element from the array.
Parameters:
-
AIntegerkey.
Returns:
An object from the array.
Get
-
A
Get
Get an element from the array.
Parameters:
-
AIntegerkey.
Returns:
An object from the array.
GetById
-
A -
A
Find
Find an element in the array. Returns null, if nothing is found.
Parameters:
-
AObjectkey.
-
AObjectvalue to search for.
Returns:
An object from the array.
GetById
-
A -
A
Find
Find an element in the array. Returns null, if nothing is found.
Parameters:
-
AObjectkey.
-
AObjectvalue to search for.
Returns:
An object from the array.
KeyCheck
-
e -
n
KeyCheck
A friendly way to check which key was used.
Parameters:
-
eObjectEvent
-
nStringName of the key to check against (e.g. 'enter', 'escape')
KeyCheck
-
e -
n
KeyCheck
A friendly way to check which key was used.
Parameters:
-
eObjectEvent
-
nStringName of the key to check against (e.g. 'enter', 'escape')
Remove
-
An
Remove
Remove an element (if found) from the array.
Parameters:
-
AnObjectelement.
Remove
-
An
Remove
Remove an element (if found) from the array.
Parameters:
-
AnObjectelement.
RemoveAt
-
Index.
RemoveAt
Remove an element at index (if found) from the array.
Parameters:
-
Index.Integer
RemoveAt
-
Index.
RemoveAt
Remove an element at index (if found) from the array.
Parameters:
-
Index.Integer
