Can anyone explain to me why the code below gives (object, Object)?
(the console.log(dope) gives what it should but after JSON.stringify and JSON.parse it just says object,Object ). If you could tell me why it's doing that it would be great.
var nombrememes = document.getElementsByClassName("meme").length;
var memenumber = nombrememes + 1;
var newmeme = prompt('Please paste the link of the meme below!');
memes.push ('placememe'+memenumber+'');
var div = document.createElement('div');
document.body.appendChild(div);
div.id = 'placememe'+memenumber+'';
div.className = 'meme';
div.innerHTML = '<img src="'+newmeme+'" width="700" height="700" alt="" />';
var dope = document.getElementById('placememe'+memenumber+'');
console.log(dope);
localStorage.setItem('dope', JSON.stringify(dope));
var pla = JSON.parse(localStorage.getItem('dope'));
alert(pla);