Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // use Promise.then()
  2. gplay.list({
  3.   country: 'tw',
  4.   collection: gplay.collection.TOP_FREE,
  5.   num: 100
  6. }).then(value =>
  7.   value.map(function (item) { return item['appId']; })
  8. );
  9.  
  10. // use async/await
  11. async function logTopFreeList() {
  12.   const value = await gplay.list(/* 略www */);
  13.   value.map(function (item) { return item['appId']; });
  14. }
  15.  
  16. logTopFreeList();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement