I have a localStorage value, which I am getting
const marks = JSON.parse(localstorage.getItem('mark'))
Now I am trying to make it robust so that if there is no key with mark in localStorage then it should not break.
localstorage.getItem('mark') ? JSON.parse(localstorage.getItem('mark')) : []
So is there any another way through which I can do the null check ?