println prints to JS console, added example.