Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

60
Vistas
Javascript code looking up for words in a description within an excel cell

Newbie here, starting to learn some coding. How to code something that look up to a word in a description?

For example: Cell A1 contains: "This is the best way for learning Javascript!" If the sentence contains: "learning", print(Yes).

Thanks!

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

String Method: String.includes may solve your need

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes

In case you need to filter from an array, google filter()

const sentence = 'The quick brown fox jumps over the lazy dog.';

const word = 'fox';

console.log(`The word "${word}" ${sentence.includes(word) ? 'is' : 'is not'} in the sentence`);
// expected output: "The word "fox" is in the sentence"
7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos