I need to modify the pad_lef function so it uses the arguments property to get the first two arguments that are passed to it. Here is my code for that function:
Obviously new to this so appreciate any and all help. Thanks.Code:var pad_left = function(text, width, pad) { if ( arguments.length < 2 || arguments.length > 3 ) { return ""; } if ( arguments.length == 2 ) { pad = " "; } var result = text.toString(); while ( result.length < width ) { result = pad + result; } return result; }


Reply With Quote
Bookmarks