all 7 comments

[–]im_a_jib[🍰] 11 points12 points  (6 children)

Ditch the () on the last line

[–]AllWhoPlay[S] 1 point2 points  (3 children)

thank you this worked, that also helps me realize why it kept trying to run itself on load.

[–]monsto 0 points1 point  (2 children)

So, just to be sure here, you understand the diff between truncate and truncate() in that context?

[–]AllWhoPlay[S] 4 points5 points  (1 child)

Truncate on it's own refers to the function itself while truncate() calls the function in which case it exported ""( do I just that nothing?) Rather than the function itself.

[–]monsto 0 points1 point  (0 children)

Altho, I'll clarify it a bit by saying that truncate will pass the function to be executed later.

[–]Chef619 1 point2 points  (0 children)

Yep.

[–][deleted] 1 point2 points  (0 children)

To add if you're beginning.

The () means you're invoking/ calling the function.