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

265
Views
Matriz de inversión en el lugar de Javascript

Soy nuevo en javascript, estoy tratando de modificar la cadena pasada como argumento para que funcione.

 const message = "Reverse"; function reverseWords(message) { let leftIndex = 0; let rightIndex = message.length - 1; // Walk towards the middle, from both sides while (leftIndex < rightIndex) { // Swap the left char and right char const temp = message[leftIndex]; message[leftIndex] = message[rightIndex]; message[rightIndex] = temp; leftIndex++; rightIndex--; } console.log(message) //Output Reverse; I don't know why } reverseWords(message);

Sé que la cadena del lenguaje C se almacena así en la memoria [R,E,V,E,R,S,E,\0], pero estoy confundido por qué la función no actualiza mi matriz de mensajes.

Por favor ayúdame a visualizarlo.

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!