Answers for "which ip address for javascript"

2

how to get ip address in javascript

fetch('https://api.ipify.org/?format=json')
  .then(response => response.json())
// Returns 
{
 "ip": "user_ip"
}
Posted by: Guest on April-24-2021
0

javascript ip

fetch('https://api.ipify.org?format=json')
    .then(results => results.json())    
    .then(data => console.log(data.ip));
Posted by: Guest on July-24-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language