Created
May 22, 2020 21:23
-
-
Save Kalaborative/439e8d0370ed106c08e52d786df69c5f 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
fetch('https://ipapi.co/json/').then( res => res.json()).then((res) => { | |
let user_IP = res.ip; | |
let city = res.city; | |
let region = res.region; | |
let userLocation = `${city}, ${region} - IP: ${user_IP}` | |
console.log(userLocation)}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment