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
getTheTitlesthat takes the array and returns the array of title and print its value in theconsole.[ ] प्रकार्य
getTheTitlesसिर्जना गर्न प्रोग्राम लेख्नुहोस् जसले एरे लिन्छ र शीर्षकको सरणी फर्काउँछ रकन्सोलमा यसको मान मुद्रण गर्दछ।