Check out the codepen here
You know, how, in english, you have sentences? This is one sentence. Here is another sentence. And, one more.
Here is a statement that grabs a DIV DOM element.
let tempImage1 = document.getElementById('image1');
Here is another statment. This one is getting an attribute.
let mySrc = tempImage1.getAttribute('src');
This code is provided as is without any warranties. It’s primarily meant for my own personal use, and to make it easy for me share code with my students. Feel free to use this code as it pleases you.
I can be reached through my website - Jay’s Developer Profile