Added JS strEndsWith function and tests