JavaaScript LocalStorage Получить номер, а не строка

if (localStorage.getItem("score") !== null) {
    score = Number(localStorage.getItem("score"));
}
Eager Earthworm