Skip to content

How to get an if statement to work? #285

Answered by megclaypool
midas0441 asked this question in Help
Discussion options

You must be logged in to vote

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. let variables are scope limited, so those values only apply inside that function block. Try getting rid of the let on both those lines, and see if your function works as expected 😀

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@midas0441
Comment options

Answer selected by SilentVoid13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants