JS - Understand variables