Replace All Occurrences In String Javascript Methods Syntax Vs Semantics