Exploring built-in functions in Javascript