JavaScript Node.js Basics Building a Command Line Application Making a GET Request with https

Anna Shalaginova
Anna Shalaginova
2,970 Points

When I run the code from this video in the console, it does not show the status code

Here is my code: const https = require('https'); const username = "chalkers"; function printMessage(username, badgeCount, points){ const message = ${username} has ${badgeCount} total badge(s) and ${points} points in Javascript.; console.log(message); } const request = https.get(https://teamtreehouse.com/${username}.json, response => { console.log(response.statusCode)

Anna Shalaginova
Anna Shalaginova
2,970 Points

Never mind, this worked in my terminal, thanks.