# Using an external JS library in function node, I'm sure it's easy

**URL:** <https://discourse.nodered.org/t/using-an-external-js-library-in-function-node-im-sure-its-easy/32481>\
**Category:** General\
**Created:** [5 September 2020 19:40 UTC](https://discourse.nodered.org/t/using-an-external-js-library-in-function-node-im-sure-its-easy/32481 "2020-09-05T19:40:34Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [6 September 2020 15:09 UTC](https://discourse.nodered.org/t/using-an-external-js-library-in-function-node-im-sure-its-easy/32481/21 "2020-09-06T15:09:35Z")

</div>

For this purpose it doesn't matter if you use `var`, `const` or `let`. The last two are newer JavaScript syntax with the intention of overcoming some peculiarities with `var`. In general the recommendation these days is to not use `var` anymore as how it works on certain corner cases can be unexpected.

`const` means the variable cannot be redefined, so it's suitable to use for library imports or constant values. `let` behaves pretty much like `var` without its peculiarities.

More info [https://codeburst.io/difference-between-var-let-and-const-in-javascript-fbce2fba7b4](https://codeburst.io/difference-between-var-let-and-const-in-javascript-fbce2fba7b4)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [20 September 2020 15:09 UTC](https://discourse.nodered.org/t/using-an-external-js-library-in-function-node-im-sure-its-easy/32481/22 "2020-09-20T15:09:41Z")

</div>

Closed on 20 September 2020 15:09 UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/using-an-external-js-library-in-function-node-im-sure-its-easy/32481.md?page=1)
