Code to go logo
Created using Figma
Use Cases
Contribute
How to check if string includes another string in JavaScript
Strings
By Jad Joubran ·
Last updated Dec 16, 2017
const text = "Code to go has awesome use cases!"; text.includes("Code to go");
true
Dec 16, 2017
1
Jad Joubran
See answer
1
Jad Joubran
String.includes
on MDN
Learn JavaScript step by step