In JavaScript, you can make an HTTP request using the built-in fetch() function or by using a third-party library such as axios or jQuery.ajax().

Here’s an example of making an HTTP request using fetch():

fetch('https://jsonplaceholder.typicode.com/todos/1')
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));

In this example, we are making a GET request to retrieve data from the JSONPlaceholder API. The fetch() function returns a Promise that resolves to the Response object representing the HTTP response from the server. We then call the .json() method on the response object to convert the response data to a JavaScript object. Finally, we log the data to the console. If there is an error during the request, we catch the error and log it to the console.

Here’s an example of making an HTTP request using axios:

axios.get('https://jsonplaceholder.typicode.com/todos/1')
  .then(response => console.log(response.data))
  .catch(error => console.error(error));

In this example, we are using the axios.get() method to make a GET request to the same JSONPlaceholder API endpoint. The axios library returns a Promise that resolves to the HTTP response object. We then log the data property of the response object to the console. If there is an error during the request, we catch the error and log it to the console.

Note that in both examples, we are handling the HTTP response asynchronously using Promises. This allows us to perform other tasks while waiting for the server to respond.