Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

332
Vistas
function()(function) in javascript what does this syntax standard?
   playbackStatusUpdate(playbackObject)(onPlaybackStatusUpdate);

i saw this code from a project i forked from Github, and i'm confused on the syntax, what does it mean?

below is the full code

export const playbackStatusUpdate =
  (playbackObject) =>
  (next = (status) => console.log({ status })) => {
    if ("setOnPlaybackStatusUpdate" in playbackObject) {
      playbackObject.setOnPlaybackStatusUpdate(next);
    }
  };

export const play =
  (playbackObject, uri, shouldPlay = true) =>
  (next = () => {}) =>
  (onPlaybackStatusUpdate = () => {}) => {
    (async () => {
      try {
        const checkLoading = await sound.current.getStatusAsync();
        const soundObj = await playbackObject?.loadAsync(
          { uri },
          { shouldPlay }
        );
        playbackStatusUpdate(playbackObject)(onPlaybackStatusUpdate);
        next(soundObj);
      } catch (error) {
        console.log(`[Audio Error][play]: ${error?.message}`);
      }
    })();
  };
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda