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

126
Views
Imprimir un número dado al revés

Mi instructor dio este código que funciona bien y, para donde estamos en este punto del curso, este es el código que espera que usemos. Entiendo el 90% de esto, pero no estoy completamente seguro de por qué combinar %10, math.trunc y luego multiplicar por 10 me dará el número inverso. Realmente espero que haya alguien aquí que pueda explicarlo en términos simples para que yo lo entienda. ¡¡Gracias!!

 let num = +prompt("enter number"); let reversedNum = 0; while (num !=0){ let rightMostDigit = num %10; num = Math.trunc(num / 10); reversedNum = reversedNum*10 + rightMostDigit; } document.write(reversedNum)
about 4 years ago · Juan Pablo Isaza
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!