Find technology name

Report a typo

Inside the cool-tech directory, there is a file with the name of an AI technology. It's the only file that has the .txt extension. Apart from it, there are other files and directories as well. We need to read the content of the cool-tech directory and find the necessary file. Finally, we need to output 'Hi + technology name!' to the console.

Which of the code examples below should we use to ahieve our goal? If done correctly, you'll be able to see that technology's name.

Here's the beginning of code:

const { readdirSync } = require('node:fs'); 
const newTechName = readdirSync('cool-tech');
Select one option from the list
___

Create a free account to access the full topic