...

/

Array Literals and Parameters

Array Literals and Parameters

This lesson explains array literals and handling arrays as parameters to functions in detail.

Array literals

When the values (or some of them) of the items are known beforehand, a simpler initialization exists using the { , ,} notation called array literals (or constructors) instead of initializing every item in the [ ]= way. Let’s see some variants. ...