How to use String includes() in JavaScript

preview_player
Показать описание
String Includes
--------------------------------------------------------------------------------------------------------
This checks whether a string contains another string includes is case sensitive.

--------------------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------------------
// code
let str = 'DevDone is an awesome tech channel'

--------------------------------------------------------------------------------------------------------
// Search functionality implementation Example

const users = [
{name: 'Adele', age: 30},
{name: 'Calvin', age: 28},
{name: 'Aman', age: 50}
]

searchString = 'Ca'

Рекомендации по теме
Комментарии
Автор

Not to be pedantic, but this isn't an implementation, it's a usage demonstration... an implementation would be a shim/shiv that adds it to String.prototype if it isn't present.

aztracker