I want to know if a string starts with the specified character/string or ends with it in jQuery.
For Example:
var str = 'Hello World';
if( str starts with 'Hello' ) {
   alert('true');
} else {
   alert('false');
}
if( str ends with 'World' ) {
   alert('true');
} else {
   alert('false');
}
If there is not any function then any alternative ?
 
     
     
     
     
     
     
     
     
     
     
    