Here's an example function that could work:
// Find all elements with the class "navigation-item"
const navigationItems = document.querySelectorAll('.navigation-item');
// Create an array to store the text content of the navigation items
const navigationText = [];
// Iterate through the elements and add their text content to the array
navigationItems.forEach((item) => {
navigationText.push({
'Navigation Item': item.textContent.trim()
});
});
// Display the results in a table in the console
console.table(navigationText);
