Hello,
I've found extreme extensibility in javascript. one of these items is prototype.
the first example:
Code:
String.prototype.endsWith = function(str){
return (this.substring(this.length - str.length, str.length) == str);
}
if('hello'.endsWith('lo')){
alert('OK!');
}
var x = 'this is one sample';
if(x.endsWith('ple')){
alert('second use');
}