Skip to content

Instantly share code, notes, and snippets.

@FleXoft
Created November 20, 2018 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FleXoft/cc6d909cbc8ea204dd66b16ddec7678b to your computer and use it in GitHub Desktop.
Save FleXoft/cc6d909cbc8ea204dd66b16ddec7678b to your computer and use it in GitHub Desktop.
javascript parameters
var header = [ "h1", "h2", "h3", "h4" ];
var col1 = [ 11, 12, , 14 ];
var col2 = [ 21, 22, 23, 24 ];
var col3 = [ 31, , 33, 34 ];
var col4 = [ 41, 42, 43, 44 ];
var col5 = [ 51, 52, 53, ];
function sortWords() {
columns = ( arguments[0].length );
for ( y = 0; y < arguments.length; y++ ) {
process.stdout.write("|");
for ( x = 0; x < columns; x++ ) {
process.stdout.write( arguments[y][x] + "|" )
}
process.stdout.write( "\n" );
}
}
sortWords( header, col1, col2, col3, col4, col5 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment