The v8 function (formerly called new_context) creates a new V8 context. A context provides an execution environment that allows separate, unrelated, JavaScript code to run in a single instance of V8, like a tab in a browser.
JS
(Package: V8) :
Mark character strings as literal JavaScript code
This function JS() marks character vectors with a special class, so that it will be treated as literal JavaScript code. It was copied from the htmlwidgets package, and does exactly the same thing.