diff --git a/AutoQuotes.js b/AutoQuotes.js new file mode 100644 index 0000000..51ae4a6 --- /dev/null +++ b/AutoQuotes.js @@ -0,0 +1,37 @@ +// Author: Muhammad Siddique +// File: AutoQuotes.js +// 🎯 Hacktoberfest 2025 Contribution +// Description: A simple Auto Quote Generator that prints a random motivational quote every few seconds in the console. + +const quotes = [ + "🌟 Believe in yourself, because you are stronger than you think.", + "πŸš€ Success doesn’t come from what you do occasionally, it comes from what you do consistently.", + "πŸ”₯ The harder you work for something, the greater you’ll feel when you achieve it.", + "🌈 Don’t limit your challenges, challenge your limits.", + "πŸ’‘ Every great developer you know started as a beginner.", + "🏁 Keep learning, keep building β€” your time is coming!", + "⚑ Failure is simply the opportunity to begin again, this time more intelligently.", + "✨ Code. Debug. Learn. Repeat. That’s how legends are made.", + "πŸ’» Stay curious. Keep coding. Be unstoppable.", + "πŸ“ˆ The only way to go is up β€” keep pushing forward!" +]; + +// Function to get a random quote +function getRandomQuote() { + const randomIndex = Math.floor(Math.random() * quotes.length); + return quotes[randomIndex]; +} + +// Function to print quotes automatically every few seconds +function startAutoQuotes(interval = 5000) { + console.log("πŸš€ Auto Quote Generator Started! (Press Ctrl + C to stop)\n"); + setInterval(() => { + console.log(getRandomQuote()); + }, interval); +} + +// Run the auto quote generator +startAutoQuotes(); + +// Export for Node.js or external usage +module.exports = { getRandomQuote, startAutoQuotes };