What is the best way, if even possible, to see the underlying code for the predefined functions in Javascript. Is there documentation that shows how these were coded, or an
They are native functions, and maybe coded in the language your JS engine was written in - you'd need to contact it's source.
However, you probably are more interested in the EcmaScript specification that describes how the algorithms work.
And if you're lucky, for some of the functions you even might find an JS equivalent. You'll find them mostly on pages that test ES implementations against the standard.