Hi campers,
I write the function initilizeTable and call it inside an if-statement:
if (Cookie.filterCookie('tasks') != []) {
initilizeTable(JSON.parse(Cookie.filterCookie('tasks')));
}
but maybe it would be better to have the if statement inside the function, like this:
function initilizeTable(values) {
if (Cookie.filterCookie('tasks') != []) {
//some logik..
}
}
so I just have to call the function name inside my index.js.
What do you think is better to read?