Node-red custom node variable undefined

Hey I am trying to build a node for that taking input from user in dashboard and filter data based on input but ** i count not access array variable in .js ( undefined )** file can someone help

contents of .html are :

<script type="text/javascript">
        category: 'function',
        color: '#e2d96e',
        defaults: {
            name: {value:""},
            dataVariable : { value : [1,2,3] } 
        icon: "white-globe.png",
        label: function() {

<script type="text/x-red" data-template-name="hello-world">
    <div class="form-row">
        <label for="node-input-name"><i class="icon-tag"></i> Name</label>
        <input type="text" id="node-input-name" placeholder="Name">

<script type="text/x-red" data-help-name="hello-world">
    <p>A simple node that changes the message payloads to Hello World</p>

contents of .js :

module.exports = function (RED) {
    "use strict";
    function HelloWorldNode(config) {
        RED.nodes.createNode(this, config);
        this.dataVariable = config.dataVariable ;
        var node = this;
        this.on('input', function (msg) {
            msg.payload = node.dataVariable;
    RED.nodes.registerType("hello-world", HelloWorldNode);

(moving your question to the category that handles custom nodes and support requests while creating them, so you might get better help on it)

Did you open your node's config panel after adding it? If not, I'm not sure that your default values have been set yet?

I normally also set the defaults in the js file as well so as to be sure.

Yaa i did it and i am not trying set defualts its just example code. i want to pass data (array) from .html form to .js . i had tried different things but nothing worked.

Actually, you are. Without a default value, it will be undefined. Try also setting a default in the .js file such as:

this.dataVariable = config.dataVariable || [9,8,7] ;

I found the solution i need to remove node from flow pallete and add it again. After restarting server changes in html were rendered without adding and removeing node so assume change are reflected but they hadn't . I am new to commuinty Thanks for Help.