How to get user's ip address in JavaScript

An IP address is a unique numerical label given to a computer when connected to a network; is a free service that retrieves IP addresses in JSON format

.then(response => response.json())
.then(response => console.log(JSON.stringify(response)))

// response

In nodejs you can use a package node-fetch

Install it by typing;

npm i node-fetch

Or using curl, in your terminal type;

curl ''

// response


Popular posts from this blog

Open-graph meta data tags introdution

What is 'this.' keyword in JavaScript

what is 'array.includes' function in JavaScript

How to use canvas context rect method for drawing rectangles

=== or == JavaScript comparison operator