es.davy.ai

Preguntas y respuestas de programación confiables

¿Tienes una pregunta?

Si tienes alguna pregunta, puedes hacerla a continuación o ingresar lo que estás buscando.

Tag: ECMASCRIPT-6

Simplemente la condición if-else en JavaScript/ES6.

¿Cómo puedo hacer este if else más simple?\n if (!request) { return ‘no request’; } else { if (loading === ‘404’) { return ‘rejected’; } if (loading === ‘200’ && !array1.length) { return ‘fulfilled’; } } Si se utiliza algún operador ternario, ¿cómo puedo hacerlo?

Eliminar el objeto en su lugar de un array: JS

Tengo una matriz de objetos con la siguiente estructura: const timeOptions = [ { key: “all”, value: “all”, text: “All” }, { key: “month”, value: “month”, text: “Month” }, { key: “year”, value: “year”, text: “Year” } ]; Estoy creando un nuevo objeto con timeOptions siendo el valor de un . . . Read more