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

220
Views
Agregar la matriz al final

Esto está escrito de 2 maneras diferentes, pero ¿cuál es la forma correcta?

Entonces, escribí este código de 2 maneras diferentes, pero ¿de qué manera se supone que debe escribirse?

¿Qué camino tiene más sentido?

Código 1 https://jsfiddle.net/mfxht794/1/

 function addEvents(handler) { eventHandlers.afterPlayerReady = handler; events.afterPlayerReady = new Event("afterPlayerReady"); } function init(options, videos) { addEvents(options.afterPlayerReady); config.playlist = videos.join(); loadIframeScript(); window.onYouTubeIframeAPIReady = onYouTubeIframeAPIReady; } return { addPlayer, init, play }; }()); videoPlayer.init({ afterPlayerReady: function initCover() { manageCover.init(function playVideo() { videoPlayer.play(); }); } }, [ "0dgNc5S8cLI", "mnfmQe8Mv1g", "CHahce95B1g", "2VwsvrPFr9w" ]);

Código 2 https://jsfiddle.net/948nkpto/

 function addEvents(handler) { eventHandlers.afterPlayerReady = handler; events.afterPlayerReady = new Event("afterPlayerReady"); } function init(options) { addEvents(options.afterPlayerReady); config.playlist = options.videos.join(); loadIframeScript(); window.onYouTubeIframeAPIReady = onYouTubeIframeAPIReady; } return { addPlayer, init, play }; }()); videoPlayer.init({ afterPlayerReady: function initCover() { manageCover.init(function playVideo() { videoPlayer.play(); }); }, videos: [ "0dgNc5S8cLI", "mnfmQe8Mv1g", "CHahce95B1g", "2VwsvrPFr9w" ] });
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!