Update substr_replace.js

I'm reading Node.js Style Guide
I'm here => Declare one variable per var statement