Last active
September 2, 2024 09:57
-
-
Save abdulhadad/a0c3d403caaa7920b353abc802678285 to your computer and use it in GitHub Desktop.
github user info
This file contains hidden or 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
| // berhasil | |
| let login = 'adobe' | |
| fetch(`https://api.github.com/users/${login}`) | |
| .then(res => res.json()) | |
| .then(response => console.log('Success:', JSON.stringify(response))) | |
| .catch(error => console.error('Error:', error)); | |
| // gagal | |
| let login = 'asdasdasdasdasdasd' | |
| fetch(`https://apixxxxxxx.github.com/users/${login}`) | |
| .then(res => res.json()) | |
| .then(response => console.log('Success:', JSON.stringify(response))) | |
| .catch(error => console.error('Error:', error)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment