localStorage [object object]

When I click on a checkbox it will pass an id and text, but looking at the localStorage I see [object object]. I know the typeof storage is object and should be an array. The question from my side is, how should I turn an object into an array?

	function addFavorite(jokeId, jokeText) {
		let storage = localStorage.getItem('favoList') || [];
		let norrisJoke = {
			id: jokeId,
			joke: jokeText
		console.log(typeof storage);
		localStorage.setItem('favoLis', norrisJoke);

9 posts were merged into an existing topic: Push is not a function