Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

168
Vistas
Unexpected ')' token

I am working on javascript objects. I am creating an array for 'Parrot Computer'. When I run the following code, it does not display on the browser and there is a javascript error message: unexpected ')' token. Kindly assist.

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Objects</title>
    <script>

        function f1(){
            var commodity={
                Id : 1,
                Name : "Parrot Computer",
                price : "350.00",
                IsInStock : true,
                Quantity : 5,
                shippedTo : ['San Francisco', 'Los Angeles'],
                Total : function(){
                    return commodity.Quantity*commodity.price;

                }

            }
            if(commodity.IsInStock==true)
            stock="Available";
            else
              stock="out of stock";

              document.write("Id : " +commodity.Id+  "<br>" + "Name=" +commodity.Name+ "<br>" + "price= " +commodity.price+ "<br>" + "Is in stock" +stock+ "<br>" + "shipped to =" +commodity.shippedTo+ "<br>" + "Total Amount " +commodity.Total()+)

        }
        f1();
    
    </script>
  </head>
  <body>
    
  
  </body>
</html>




  
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda