How to get an if
statement to work?
#285
-
created: 2021-07-17 Sat 17:16:03
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
On lines 5 and 6 you have: let title = "tryme " + tp.date.now("YYYY-MM-DD");
let tags = "tryme"; I think by using the let keyword here, you are redeclaring the variables. |
Beta Was this translation helpful? Give feedback.
On lines 5 and 6 you have:
I think by using the let keyword here, you are redeclaring the variables.
let
variables are scope limited, so those values only apply inside that function block. Try getting rid of thelet
on both those lines, and see if your function works as expected 😀