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

197
Views
¿Qué ingreso en el constructor de elementos Matrix para llenar la matriz?
 export class Matrix { constructor(...m) { console.log(...m); this.m = new Array(16).fill(0).splice(0, m.length, ...m); } toArray() { return [...this.m]; } toString() { return `(${this.m.join(',')})`; } negate(){ } } const mtrx = new Matrix(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16);

Este es el constructor que me dio mi maestro, ¿cómo puedo llamar a este constructor y poner elementos dentro? ...m significa cualquier matriz, pero no puedo encontrar la sintaxis correcta en línea. Si lo llamo como lo hice, obtengo una matriz llena de 0.

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

0

Lo que funcionó es simplemente hacer esto:

 this.m = new Array(16).fill(0); this.m.splice(0, m.length, ...m);
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!