In C# i have a collection for a type like this.
public class scale
{
}
public class scales : List<scale>
{
// some codes.
}
For scale, I used the functions like this:
scale = function ( )
{
}
How to create a scales (collections for a function) in js?
Javascript currently has no proper concept of a collection type, just use the array type:
You can still access the associated properties:
You could define
scalesto be a class itself:Usage: