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

369
Vistas
How can I Random A-Z JavaScript?

I have a problem with Lua obfuscator which uses Java Script and I want to modify it from name(num) to random a-z(num)

This is the line in question : https://codeshare.io/X8XBbo Me + makeid which is Random A-Z but when i did it it doesn't work i don't know what i did wrong please help me i am newbie

Code = https://codeshare.io/RboW0E My error is at lines 1-10 = makeid function and 30 = procress line

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

Your random ID generator works:

function makeid(length) {
  var result           = '';
  var characters       = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
  var charactersLength = characters.length;
  for ( var i = 0; i < length; i++ ) {
    result += characters.charAt(Math.floor(Math.random() * 
                                           charactersLength));
  }
  return result;
} 

console.log(makeid(5))

There's a comma after the function on line 12. Remove that and put the second function on a new line.

Also it seems like there's more code after what you shared since your second function doesn't close, so aside from the comma, I can't tell what could be causing issues.

Did you change your variable names to letters for the sake of the question? If not, I'd recommend you use more explanatory variables names. It makes the code easier for you and others to understand.

I personally also feel that the comma separated declarations are a bit harder to follow.

If you're getting into JS, check out the Airbnb style guide for some good syntax rules to follow.

about 4 years ago · Santiago Gelvez Denunciar
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