Hallo,
wie ist das gemeint, dass Arrays Funktionen speichern können?
// myArray[1] = myFunction;
wie ist das gemeint, dass Arrays Funktionen speichern können?
// myArray[1] = myFunction;
// JavaScript variables can be objects. Arrays are special kinds of objects.
// Because of this, you can have variables of different types in the same Array.
// You can have objects in an Array. You can have functions in an Array. You can have arrays in an Array:
// myArray[0] = Date.now;
// myArray[1] = myFunction;
// myArray[2] = myCars;
// Because of this, you can have variables of different types in the same Array.
// You can have objects in an Array. You can have functions in an Array. You can have arrays in an Array:
// myArray[0] = Date.now;
// myArray[1] = myFunction;
// myArray[2] = myCars;