let arr=[]
localStorage.setItem("arr", JSON.stringify(arr))
let priceArrString = localStorage.getItem("arr")
let priceArr=JSON.parse(priceArrString)
function setStorageData(key, data) {
localStorage.setItem(key, JSON.stringify(data));
}
function getStorageData(key, defaultValue = []) {
return JSON.parse(localStorage.getItem(key)) ?? defaultValue;
}