<div id='demo'><div>
<script type="module">
  const souptonuts = [{
    name: 'far',
    email: 'quad'
  },
  {
    name: 'car',
    email: 'squad'
  }
]

const weakReef = {
  island: () => {
    for (let p = 0; p <= souptonuts.length-1; p++) {
      let somep = souptonuts[p]
      // console.log(somep)
      let k = Object.keys(somep)
      // console.log(k)
      for (let i = 0; i <= k.length-1; i++) { 
        // console.log(somep) 
        // console.log('somep[k[i]]: ' + somep[k[i]] + ', i: ' + i + ', k[i]: ' + k[i])
        let thiskey = [k[i]]
        // console.log(somep)
        let temp = somep[k[i]]
        // console.log(temp)
        window[`${k[i]}`] = temp 
      }
    }
  }
}
weakReef.island()
  console.log(email)
  console.log(name)
  let demo = document.querySelector('#demo')
  demo.innerHTML = email + ' ' + name
</script>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.