in node js i have this code
const scraper = () => axios.get("https://thehackernews.com/").then((urlData) => {
const $ = cheerio.load(urlData.data)
videoTitle = $(".home-title")
})
console.log("logging to the console:", videoTitle)
client.messages
.create({
body: `Message: ${videoTitle}`,
})
.then(message => console.log(message.sid))
.done();
im trying so what ever is scraped from the website using videoTitle is going to go into the body for the messages, but it keeps saying undefined