# Function Node with multi-output

**URL:** <https://discourse.nodered.org/t/function-node-with-multi-output/28031>\
**Category:** General\
**Created:** [9 June 2020 06:26 UTC](https://discourse.nodered.org/t/function-node-with-multi-output/28031 "2020-06-09T06:26:03Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 June 2020 06:35 UTC](https://discourse.nodered.org/t/function-node-with-multi-output/28031/3 "2020-06-09T06:35:37Z")

</div>

Hi, in order to make code more readable and importable it is important to post it between two sets of three backticks - ``` - see this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

Your code is currently unreadable - please edit your post.

Secondly,

Read this [the documentation on functions](https://nodered.org/docs/user-guide/writing-functions#multiple-messages) it tels you about sending multiple messages

Basically, its doing what you asked. (if you want 1 mesage for each output, remove the outer array e.g.

```auto
//return [outputMsgs]; << for sending multiple as per docs
return outputMsgs ; // << for sending 1 per output

```

---

_[View the full topic](https://discourse.nodered.org/t/function-node-with-multi-output/28031)._
