Get the Titles! (टाइल प्राप्त गर्नुहोस्)

The Get the Tiles! problem is an interesting problem where we have to get the title from a list of books. This is a good exercise for the implementation of arrays and objects.

टाइल प्राप्त गर्नुहोस्! समस्या एक रोचक समस्या हो जहाँ हामीले पुस्तकहरूको सूचीबाट शीर्षक प्राप्त गर्नुपर्दछ। यो एरे र वस्तुहरूको कार्यान्वयनको लागि एक राम्रो अभ्यास हो।

📝 Tasks:

Given an array of objects that represent books with an author.

एक लेखकसंग पुस्तकहरू प्रतिनिधित्व गर्ने वस्तुहरूको एक एर्रे दिइएको छ।

const books = [
  {
    title: "Eloquent JavaScript, Third Edition",
    author: "Marijn Haverbeke"
  },
  {
    title: "Practical Modern JavaScript",
    author: "Nicolás Bevacqua"
  }
]
  • [ ] Write a program to create a function getTheTitles that takes the array and returns the array of title and print its value in the console.

  • [ ] प्रकार्य getTheTitles सिर्जना गर्न प्रोग्राम लेख्नुहोस् जसले एरे लिन्छ र शीर्षकको सरणी फर्काउँछ र कन्सोल मा यसको मान मुद्रण गर्दछ।

💡 Hints:

  • Visit the arrays and objects chapter to understand how the array and object work.

  • एरे र वस्तुले कसरी काम गर्दछ भनेर बुझ्न एरेवस्तुहरू अध्यायमा जानुहोस्।

results matching ""

    No results matching ""