Store a value in a function

Is there a way to store a value in a function node for future use? I want to do the following: A message contains a certain variable with a certain value. This message is received every 5 minutes. I want to compare the value of the variable with the value from the previous message and act upon the difference. Is that possible with a function node or should I use some other node?

Regards

Sjoerd van Staveren

Directly from docs: https://nodered.org/docs/writing-functions#storing-data

You can also store and retrieve the values using a change node

Oh dear, I should be ashamed of myself. Thank you for the quick response.

appecriate , if you can share me your sample code that u have written to get the values between 5 min interval.

Thanks

@Energycharges - two things
1 - did you read the documentation mentiond in this thread??
2 - this thread is over two years old so I'm going to close it. If you continue to have an issue after reading the documentation, please start a new thread explaining what you have tried and what you are trying to do. Thanks!