Ver Mensaje Individual
  #5 (permalink)  
Antiguo 02/07/2015, 22:34
sarrhen
 
Fecha de Ingreso: mayo-2013
Ubicación: San Vicente
Mensajes: 127
Antigüedad: 11 años
Puntos: 1
Respuesta: Switch Case problemas al generar codigo

ya verifique y corregíerrores y no me ejecuta nada
Código Javascript:
Ver original
  1. <script type="text/javascript">
  2.   var valor;
  3.   valor=prompt('Ingrese un valor comprendido entre 1 y 4:','');
  4.    
  5.     var CuotaAntigua = 75;
  6.     var cuotaNueva = 100;
  7.  
  8.   //Convertimos a entero
  9.   valor=parseInt(valor);
  10.   switch (valor) {
  11.      
  12.     case 1:
  13.             (cuotaNueva > 0 && CuotaAntigua === 0);
  14.          var CuotaTransitoria = (cuotaNueva - 0);
  15.             document.write(CuotaTransitoria);
  16.             break;
  17.     case 2:
  18.             var CuotaTransitoria = (cuotaNueva - CuotaAntigua );
  19.             document.write(CuotaTransitoria);
  20.             break;
  21.     case 3:
  22.             var CuotaTransitoria = 2*(cuotaNueva - CuotaAntigua );
  23.             document.write(CuotaTransitoria);
  24.             break;
  25.    
  26.     case 4: (cuotaNueva >0 && CuotaAntigua <0);
  27.         var  CuotaTransitoria === 0;
  28.             document.write(CuotaTransitoria);
  29.             break;
  30.     default:document.write('debe ingresar un valor comprendido entre 1 y 4.');
  31.   }
  32. </script>