What type to use in script ? let or var

Hi there, I’m new to automatisation and coding, I checked online what was the difference between let and var and I wanted to know if there was a preference on using either one.

Thanks

If you are new to scripting the difference might be too subtle for you to understand until you gain a bit more experience. If you are just starting to learn JavaScript, I recommend using let to start, but if you find code that uses var that you want to borrow, don’t let that stop you.