JavaScript » Layer » name

Syntax:
layer.name

This property returns a string that contains the name of a layer as defined by the ID atttribute of the <LAYER> tag.