Question: I have a 2D array used to store non-repeated values and some entries are randomly picked and push\_back-ed into a vector as favorite list.

```
int num[10][10];
vector<int> fav_list;
int retrieved_i, retrieved_j, retrieve_vector_position;

for(i=0;i<10;i++) for(j=0;j<10;j++)
// ...assign numbers to num...

fav_list.push_back(num[2][3]);
fav_list.push_back(num[4][7]);
fav_list.push_back(num[6][2]);
//...push_back more random selected num[...][...] into fav_list...

```

The problem is, how can I retrieve the `i, j` index of particular `fav_list[...]`?

I've tried to make struct `struct Num{int value, index_i, index_j;}num[10][10];` so that I can do in this way

```
retrieved_i = fav_list[retrieve_vector_position].index_i;
retrieved_j = fav_list[retrieve_vector_position].index_j;

```

but I wish to know is there any other better/ efficient ways?

Answer: 
notification.js

```
function notification(message, level = 'success') {
    Lobibox.notify(level, {
        delayIndicator: false,
        msg: message

    });
}

window.notification = notification;

```

Solve it. I need to add `window.notification = notification` so I can call it everywhere.
It seems you just need to do following in your HTML:

```
<script src="js/notification.js"></script>
<script src="js/app.js"></script>

```