In one of my GitHub projects I have a tutorial on how a LoadRunner C script call call functions in a JavaScript library. The example takes you step-by-step using an Agile approach.
Right now it's at: https://github.com/wilsonmar/LoadRunner/blob/master/random_birthdate_js/README.md
I chose the example of calculating data because that would involve many of JavaScript functions and data types.
Let me know what you think.