What is "\n" in JS programming??

Hi guys,

someone helped me write this for loops yesterday -

for(var inventoryLoop = 0; inventoryLoop < collectItem.InventArray.length; inventoryLoop++) { 
		InventoryGUI += collectItem.InventArray[inventoryLoop] + "\n";  
	}

And I can’t remember what the \n does. Tried looking it up in javascript sites online but can’t really find one that makes sense, maybe i’m just being rubbish.

Cheers

Will

It’s a “newline” (line break) character. This code probably puts inventory items into a string that spans multiple lines.

Yes that makes perfect sense, for some reason thought it was more complex!

Thanks Aras