Update substr_replace.js

Added test/examples