Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

50
Vistas
How do I console.log only the highestRated rating and the Movie-title of highestRated rating

I have been trying to out only the rating and title of the movie but when consolelog highestRated I keep on getting the full object. How do I console.log only the highestRated rating and the Movie-title of highestRated rating

sample output;

highest rated : Joker (10)

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

To get highestRated rating and highestRated movieTitle

// movieTitle
console.log(highestRated.movieTitle);
// rating
console.log(highestRated.rating);

// Output highest rated: Joker(10)
console.log(`highest rated : ${highestRated.movieTitle} (${highestRated.rating})`);
7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos