Update genName.js

Added comments for clarification.