|
But if you don't understand sync/async and how it works in a specific
language, how do you know to even use promises, callbacks or "await"? :)
I know, you'll figure it out eventually when googling why your function
isn't working how you expect it and enter the whole new world of async
calls.
But that still doesn't answer the question if understanding the complexity
described in the video is a prerequisite to be able to put together
applications that perform their best.
On Wed, Sep 14, 2016 at 4:21 PM, Aaron Bartell <aaronbartell@xxxxxxxxx>
wrote:
featuresDo I need to understand something so complex in order to make my JSapplication perform it's best?
Javascript before ES2015 was much more complicated. There are new
that either exist or are coming that make Javascript work in a moreasync
"visibly procedural" fashion. Here's an example of the "await" keyword:
var customer = await getCustomer();
var invoices = await getInvoices(customer.id);
var tickets = await getTickets(customer.id);
The above code looks very normal. To accomplish this in traditional
fashion would be more busy and harder to understand.--
Aaron Bartell
litmis.com - Services for open source on IBM i
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.