Created
July 13, 2019 15:47
-
-
Save ohoroyoi/0ffef3c8bc19fe5236e6f213b316d6ea to your computer and use it in GitHub Desktop.
할튼 콜백 내가 너 이해해버린다 이거임
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.getJSON('https://jsonplaceholder.typicode.com/todos/1', (data) => { | |
console.log(data); | |
}); | |
const getTodos = (id, onSuccess) => { | |
$.getJSON(`https://jsonplaceholder.typicode.com/todos/${id}`, (data) => { | |
// console.log(data); | |
onSuccess(data); | |
}); | |
}; | |
getTodos('1', (data) => { | |
console.log(data); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment