Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. apiReturn = {
  2. {title: "I can't stop cumming", id: "fart"},
  3. {title: "Ah, fuck yeah", id: "poopy"}
  4. }
  5.  
  6. let bookShelfKeyValueStore = {};
  7.  
  8. apiReturn.forEach(bookObj => {
  9. shelfKeyValueStore[bookObj.id] = bookObj;
  10. });
  11.  
  12. // Can I the same thing without declaring this empty object like that
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement