1234567890
в (123) 456-78-90
?var number = '1234567890';
return number.replace( 'Что писать тут?', 'И тут');
var REGEXP_PHONE = /(\d{3})(\d{3})(\d{2})(\d{2})/;
var number = '1234567890';
var numberObj = number.match(REGEXP_PHONE);
number = "(" + numberObj[1] + ") " + numberObj[2] + "-" + numberObj[3] + "-" + numberObj[4];
// Или ES6
number = `(${numberObj[1]}) ${numberObj[2]}-${numberObj[3]}-${numberObj[4]}`;