Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

367
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!