Guest User

Untitled

a guest
May 25th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. function start() {
  2. // REQUEST THE DATA FROM API
  3. $.ajax({
  4. dataType: "json",
  5. url: "js/data.json",
  6. data: data,
  7. success: function (result) {
  8. displayTheData(result)
  9. }
  10.  
  11. });
  12. }
  13.  
  14. function displayTheData(result) {
  15. console.log(result)
  16. }
  17.  
  18. [{
  19. "name":"Google",
  20. "url": "google.es",
  21. },
  22. {
  23. "name":"Yahoo",
  24. "url": "yahoo.com",
  25. }
  26. ]
Add Comment
Please, Sign In to add comment