showing results for - "javascript picture delete after time"
Jonathan
14 Mar 2018
1function rockImage() {
2    const img = document.createElement('img');
3    img.src = 'https://via.placeholder.com/100';
4    img.setAttribute('width', '100');
5    
6    const parent = document.getElementById('div');
7    parent.appendChild(img);
8    
9    setTimeout(() => parent.removeChild(img), 3000);
10}
11
12rockImage();