let str = 'something testing strong'; let value = str.substr(0, str.length - 6); alert(value);
alert( 'something testing strong'.slice(0, -6) );
alert( 'something testing strong'.match(/.+(?=.{6})/) );
alert( 'something testing strong'.replace(/.{6}$/, '') );