JavaScript String functions startsWith() & endsWith() #javascript ( #shorts )

1 year ago
3

Hi Friends,

JavaScript String functions `startsWith()` & `endsWith()`

`startsWith()` & `endsWith()` functions check if a string starts & ends with that particular substring respectively and return the boolean value(true or false) based on the value provided those functions to check.

let str = "Hey there!";
console.log(str.startsWith("Hey")); // true
console.log(str.endsWith("there!")); // true

#javascript #string #javascriptstring #javascriptlearning #javascriptinterview #javascriptstringfunctions #stringfunctions #stringstartwith #stringendswith #startswith #endswith #startwithinterview #endswithinterview #startend #start #end #interview #interviewquestionsandanswers #question #answer #questionanswer #questionandanswer #shorts #trending #trend #popular #method #function #princecheema_official @princecheema_official ​

Loading comments...