I’m a newbie at both Templater and JavaScript, so could someone please tell me why the following code doesn’t work for defining a variable?
<%*
var thing = false;
await tp.system.suggester(["Yes", "No"], [thing = true, thing = false], false, "Thing?");
-%>
It always gives false.
I also tried the following, but that throws a Template syntax error: Unexpected token 'var':
<%*
var thing = false;
await tp.system.suggester(["Yes", "No"], [var thing = true, var thing = false], false, "Thing?");
-%>
(Using var bc I need to use these variables in if statements in other parts of the note, and from what I understand, let doesn’t allow this.)