M06 UF1Q5. Exercicis per practicar objectes
La revisió el 10:39, 28 oct 2021 per Joan (discussió | contribucions)
Introducció
A classe hem estat veient la teoria d'expressions regulars:
Desenvolupament
Tasques a realitzar
0. Crea l'objecte Assignatura:
var Asignatura = {
ref: 'BBDD',
nom: 'Bases de Dades',
hores: 180,
UF: ['UF1','UF2','UF3','UF4'],
professor: 'Pep Parés',
alumnes: ['alu1','alu2','alu13,'alu4','alu5']
};
1. Write a JavaScript program to list the properties of a JavaScript object.
2. Write a JavaScript program to delete the rollno property from the following object. Also print the object before or after deleting the property.
3. Write a JavaScript program to get the length of a JavaScript object.
4. Write a JavaScript program to display the reading status (i.e. display book name, author name and reading status) of the following books.
var library = [
{
author: 'Bill Gates',
title: 'The Road Ahead',
readingStatus: true
},
{
author: 'Steve Jobs',
title: 'Walter Isaacson',
readingStatus: true
},
{
author: 'Suzanne Collins',
title: 'Mockingjay: The Final Book of The Hunger Games',
readingStatus: false
}];
5.
6.
7.
8.
9.
10.
Entrega
Entrega al Classroom, en format pdf o google docs, dels codis generats i les sortides per pantalla que demostrin el bon funcionament dels exercicis.
Ajuda
creat per Joan Quintana Compte, octubre 2021