Clearing up the confusion around JavaScript references