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

178
Views
How should I code a "scale shape measurements at once"?

This is my first ever effort to code something from scratch in JS. I'm self-taught (YouTube, FCC, some others) for the last 6 months. I'm changing life goals, I'm a graphic designer wanting to become full stack dev :)

The idea is to have measurements in an array, then multiply them using the scale value.

This is what I got:

const shape = [side1, side2, side3, side4];
  let side1= (num);
  let side2= (num);
  let side3= (num);
  let side4= (num);
}
    let scale = (num);

function scaleShape(shape, scale) {
   for (var i = 0 < shape.length; i++) {
      shape[i] *= scale;
   }
return shape;
}

return scaleShape();

Thanks everyone! ☺️👍

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!