JSContext-method-get: Get a variable from the current context

JSContext-method-getR Documentation

Get a variable from the current context

Description

Get the value of a variable from the current context

Usage

get(var_name)

Arguments

var_name

The name of the variable to retrieve

Format

An object of class NULL of length 0.

Value

The value of the variable

Examples

## Not run: 
ctx <- JSContext$new()
ctx$source(code = "var a = 1;")
ctx$get("a")

## End(Not run)

QuickJSR documentation built on April 13, 2025, 5:12 p.m.