summaryrefslogtreecommitdiffstats
path: root/howtos/globaldata/index.rst
blob: d677dab14a5585b82afa9eb4c3a33f2089f07235 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
..
    ---------------------------------------------------------------------------
    Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
    All rights reserved.
    This work, unless otherwise expressly stated, is licensed under a
    Creative Commons Attribution-ShareAlike 2.5.
    The full license document is available from
    http://creativecommons.org/licenses/by-sa/2.5/legalcode .
    ---------------------------------------------------------------------------

How to store global data
========================

For storing global data, you would need a :ref:`Stateless Javascript library<stateless_javascript_library>`. Once you have created a stateless Javascript file, then you can store global variables and data in that file.

.. code-block:: js

    //my_stateless_js_file

    var data = ['data1', 'data2']