what is .then for?

Posted 2 months ago by davy_yg


I cannot understand what is .then is for?

Why even use .then? why not just goes with function(data){ }) without .then?

myForm.addEventListener('submit', function(e){

    var url = 'https://randomuser.me/api/?results=10';
        console.log('enter then');


Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.