# How to delete a flow variable from a \`function\` node

**URL:** <https://discourse.nodered.org/t/how-to-delete-a-flow-variable-from-a-function-node/19731>\
**Category:** General\
**Created:** [30 December 2019 09:06 UTC](https://discourse.nodered.org/t/how-to-delete-a-flow-variable-from-a-function-node/19731 "2019-12-30T09:06:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [30 December 2019 09:08 UTC](https://discourse.nodered.org/t/how-to-delete-a-flow-variable-from-a-function-node/19731/2 "2019-12-30T09:08:57Z")

</div>

It’s not the most logical approach, but with some understanding of core JavaScript/core Node-RED logic it makes more sense: by setting it to `undefined`.

`flow.set('example', undefined);`

---

_[View the full topic](https://discourse.nodered.org/t/how-to-delete-a-flow-variable-from-a-function-node/19731)._
