100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Examen

IRM4724 Assignment 4 2024 Due 5 September 2024 (Detailed solution)

Puntuación
-
Vendido
-
Páginas
9
Grado
A+
Subido en
23-08-2024
Escrito en
2024/2025

Question 1: Write a JavaScript function to add the following books in the library collection for author John Grisham (30 Marks) To begin, we'll create a JavaScript function to add books to the library collection. We will use an array to store the books, where each book is represented by an object containing the title, author, and year of publication. ```javascript // Initialize the library collection as an empty array let libraryCollection = []; // Function to add a book to the library collection function addBook(title, author, year) { libraryC({ title: title, author: author, year: year }); } // Add books by John Grisham to the library collection addBook("A Time to Kill", "John Grisham", 1989); addBook("The Firm", "John Grisham", 1991); addBook("The Pelican Brief", "John Grisham", 1992); addBook("The Client", "John Grisham", 1993); addBook("The Chamber", "John Grisham", 1994); addBook("The Rainmaker", "John Grisham", 1995); addBook("The Runaway Jury", "John Grisham", 1996); addBook("The Partner", "John Grisham", 1997); addBook("The Street Lawyer", "John Grisham", 1998); addBook("The Testament", "John Grisham", 1999); addBook("The Brethren", "John Grisham", 2000); addBook("A Painted House", "John Grisham", 2001); addBook("Skipping Christmas", "John Grisham", 2001); addBook("The Summons", "John Grisham", 2002); addBook("The King of Torts", "John Grisham", 2003); addBook("Bleachers", "John Grisham", 2003); addBook("The Last Juror", "John Grisham", 2004); addBook("The Broker", "John Grisham", 2005); addBook("Playing for Pizza", "John Grisham", 2007); addBook("The Appeal", "John Grisham", 2008); addBook("The Associate", "John Grisham", 2009); addBook("The Confession", "John Grisham", 2010); addBook("The Litigators", "John Grisham", 2011); addBook("Calico Joe", "John Grisham", 2012); addBook("The Racketeer", "John Grisham", 2012); addBook("Sycamore Row", "John Grisham", 2013); addBook("Gray Mountain", "John Grisham", 2014); (libraryCollection);

Mostrar más Leer menos
Institución
Grado









Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
Grado

Información del documento

Subido en
23 de agosto de 2024
Número de páginas
9
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

Vista previa del contenido

IRM4724


Assignment 4


2024

, Question 1: Write a JavaScript function to add the following books in the
library collection for author John Grisham (30 Marks)


To begin, we'll create a JavaScript function to add books to the library collection. We will use an
array to store the books, where each book is represented by an object containing the title, author,
and year of publication.



```javascript
// Initialize the library collection as an empty array
let libraryCollection = [];

// Function to add a book to the library collection
function addBook(title, author, year) {
libraryCollection.push({ title: title, author: author, year:
year });
}

// Add books by John Grisham to the library collection
addBook("A Time to Kill", "John Grisham", 1989);
addBook("The Firm", "John Grisham", 1991);
addBook("The Pelican Brief", "John Grisham", 1992);
addBook("The Client", "John Grisham", 1993);
addBook("The Chamber", "John Grisham", 1994);
addBook("The Rainmaker", "John Grisham", 1995);
addBook("The Runaway Jury", "John Grisham", 1996);
addBook("The Partner", "John Grisham", 1997);
addBook("The Street Lawyer", "John Grisham", 1998);
addBook("The Testament", "John Grisham", 1999);
addBook("The Brethren", "John Grisham", 2000);
addBook("A Painted House", "John Grisham", 2001);
addBook("Skipping Christmas", "John Grisham", 2001);
addBook("The Summons", "John Grisham", 2002);
addBook("The King of Torts", "John Grisham", 2003);
addBook("Bleachers", "John Grisham", 2003);
addBook("The Last Juror", "John Grisham", 2004);
addBook("The Broker", "John Grisham", 2005);
addBook("Playing for Pizza", "John Grisham", 2007);
addBook("The Appeal", "John Grisham", 2008);
addBook("The Associate", "John Grisham", 2009);
addBook("The Confession", "John Grisham", 2010);
addBook("The Litigators", "John Grisham", 2011);
addBook("Calico Joe", "John Grisham", 2012);
addBook("The Racketeer", "John Grisham", 2012);
addBook("Sycamore Row", "John Grisham", 2013);
addBook("Gray Mountain", "John Grisham", 2014);

console.log(libraryCollection);
```
$2.81
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
LectureLab Teachme2-tutor
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
626
Miembro desde
1 año
Número de seguidores
188
Documentos
1022
Última venta
1 mes hace
LectureLab

LectureLab: Crafted Clarity for Academic Success Welcome to LectureLab, your go-to source for clear, concise, and expertly crafted lecture notes. Designed to simplify complex topics and boost your grades, our study materials turn lectures into actionable insights. Whether you’re prepping for exams or mastering coursework, LectureLab empowers your learning journey. Explore our resources and ace your studies today!

3.6

80 reseñas

5
32
4
14
3
16
2
4
1
14

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes