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

287
Views
Si hay demasiados 9 después de cierto punto, haz algo.

Entonces, básicamente, hay un problema con math js donde id tiene que hacer esta ecuación 1: 999 o más nueves, se bloqueará.

 try { if(args == "1:999") return message.channel.send('That question is not allowed'); } catch(error){ message.channel.send("there was an error") }

En este momento, si tiene que calcular 1: 999, da un error, pero lo quiero en su lugar para ver si la ecuación tiene más nueves. Por ejemplo, si hiciera 1:9999999, también daría un error, pero básicamente cualquier cosa que tenga más de tres nueves en esta ecuación dará un error.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

El siguiente ejemplo muestra el uso de una expresión regular para comprobar si una cadena tiene el formato "1:999", "1:9999", "1:99999", ...

 if (/^1:999+$/.test(arg)) {
about 4 years ago · Juan Pablo Isaza Report

0

Puede usar String#EndsWith para verificar si la cadena termina con el número 9 que desea usando String#repeat

 if (args.endsWith('9'.repeat(count))) { console.log("Too many nines"); }
about 4 years ago · Juan Pablo Isaza 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!