How do I access _memory_ from a function?

1) First I tried passing in memory into the input variable of a function, but memory is not available from the variable selector.

2a) Tico says memory already is available from inside a function:
"memory
is an internal object, so we don’t surface it in the variable-picker. The good news is you don’t have to map it – every Function (and JavaScript) step already runs in the same scope, so you can read it directly inside your code."
and said to use:
const history = memory.history;

2b) But when I look in Debug Variables, I don't see memory having a .history so I tried both the above and the below:
const history = memory;

The above are not working for me. How do I access memory from a function? Thanks so much!
Was this page helpful?