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

180
Views
¿Hay alguna manera de crear una instancia específica de SmileyFace y pasar el nombre de eso como argumento para drawSmiley()?

 var faceObj = { centerX: 100, centerY: 100 }; var drawSmiley = function(faceObj) { fill(168, 124, 70); ellipse(faceObj.centerX, faceObj.centerY, 150, 150); fill(0, 0, 0); ellipse(faceObj.centerX-30, faceObj.centerY-30, 20, 20); ellipse(faceObj.centerX+30, faceObj.centerY-30, 20, 20); noFill(); strokeWeight(3); arc(faceObj.centerX, faceObj.centerY+10, 64, 40, 0, 180); }; var SmileyFace = function(x, y) { this.centerX = x; this.centerY = y; }; //SmileyFace.speak('hello!'); var faceObj = new SmileyFace(this.centerX, this.centerY); drawSmiley(SmileyFace); var faceObj = new SmileyFace(100, 100);

¿Cómo respondo a esta declaración mientras sigo manteniendo este código? "Estás pasando el nombre del objeto (SmileyFace) como argumento cuando llamas a drawSmiley(). En su lugar, crea una instancia específica de SmileyFace y pasa el nombre de eso como argumento a drawSmiley()".

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!