Qtr No. 213, New Town Yehlanka
Indore 454775, India
A developer is creating a JavaScript function to manage a library system. The function needs to declare variables for the book title, author name, and the number of copies available. Which line of code will cause an error?
function manageLibrary() { //Line 1
let bookTitle = "JavaScript Essentials"; //Line 2
let authorName = "John Doe"; //Line 3
let numberOfCopies = 5; //Line 4
let book-title = bookTitle + " by " + authorName; //Line 5
let totalCopies = numberOfCopies * 2; //Line 6
return book-title + " has " + totalCopies + " copies available."; //Line 7
}
Line 5
Line 2
Line 4
Line 3
To get all Infosys Certified JavaScript Professional Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee