replaceAll = (str, defaultReplacement = '', subStrings) => {

  for (let i = subStrings.length; i--;) {

    let subString = subStrings[i];
    let replacement = defaultReplacement;

    if (Array.isArray(subString)) {
      replacement = subString[1];
      subString = subString[0];
    }

    str = str.replace(subString, replacement);
  }

  return str;

}
@param {string} str
@param defaultReplacement
@param subStrings
@return {*}