function ToMegaByteString(bytes) {
  var mb = Math.floor(bytes / (1 << 20));
  return mb.toString().replace(
      /\d+?(?=(\d{3})+$)/g,  // Digit sequence (\d+) followed (?=) by 3n digits.
      function(three_digit_block) {
        return three_digit_block + ',';
      });
}
/**
 * Converts a number in bytes to a string in megabytes split by comma into
 * three digit block.
 * @param {number} bytes The number in bytes.
 * @return {string} Formatted string in megabytes.
 */
Converts a number in bytes to a string in megabytes split by comma into
three digit block.
@param {number} bytes The number in bytes.
@return {string} Formatted string in megabytes.
Converts a number in bytes to a string in megabytes split by comma into three digit block . @param { number } bytes The number in bytes . @return { string } Formatted string in megabytes .
function ToMegaByteString(bytes) {
  var mb = Math.floor(bytes / (1 << 20));
  return mb.toString().replace(
      /\d+?(?=(\d{3})+$)/g,  
      function(three_digit_block) {
        return three_digit_block + ',';
      });
}
function ToMegaByteString ( bytes ) { var mb = Math . floor ( bytes / ( 1 << 20 ) ) ; return mb . toString ( ) . replace ( / \d+?(?=(\d{3})+$) / g , function ( three_digit_block ) { return three_digit_block + ',' ; } ) ; }
Converts a number in bytes to a string in megabytes split by comma into
 three digit block.
Converts a number in bytes to a string in megabytes split by comma into three digit block .
// Digit sequence (\d+) followed (?=) by 3n digits.