Giter Site home page Giter Site logo

Comments (4)

latentflip avatar latentflip commented on July 23, 2024 4

I think the problem is that it won't currently support code written in ES6 (so const, arrow functions, argument defaults). But it doesn't make that very clear what's going on for sure.

from loupe.

viT-1 avatar viT-1 commented on July 23, 2024

Same problem with code

console.log(1)

setTimeout(() => { console.log(2) })

const prom1 = new Promise(resolve => {
	console.log(3)
	resolve(4)
})

const prom2 = new Promise(resolve => {
	console.log(5)
	resolve(6)
})

prom1.then(console.log)
prom2.then(console.log)

console.log(7)

from loupe.

vgjenks avatar vgjenks commented on July 23, 2024

I think the problem is that it won't currently support code written in ES6 (so const, arrow functions, argument defaults). But it doesn't make that very clear what's going on for sure.

This is a super useful tool that I'm directing newer devs to - any chance you could get it updated to accommodate modern syntax? It also showed up in a course I took, and it was disappointing to see it not work with ES6 code.

from loupe.

seshasaisuhashdesu avatar seshasaisuhashdesu commented on July 23, 2024

Doesnt work with this code as well. Looks like its unable to locate the document. @latentflip Can you please accommodate the corrections?

// JS

//Dynamically generated image URLs
    var imageUrls = [
      'https://unsplash.com/s/photos/random',
      'https://unsplash.com/photos/Dqw5Zx7Y364',
      'https://unsplash.com/photos/l3N9Q27zULw'
    ];

    // Function to generate image elements dynamically
    function generateImages() {
      var container = document.getElementById('imageContainer');

      // Iterate through the image URLs
      imageUrls.forEach(function(url) {
        var img = document.createElement('img');
        img.src = url;
        container.appendChild(img);
      });
    }

    // Call the function to generate images
    generateImages();
  

//HTML

<!DOCTYPE html>
<html>
<head>
 <title>Dynamic Image URLs</title>
</head>
<body>
 <h1>Dynamic Image URLs</h1>
 <div id="imageContainer">
 </div>
</body>
</html>

from loupe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.