var matrix = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ]; var vector = array(matrix.length * matrix[0].length); var k = 0; for (var i=0; i<matrix.length; i++) { for (var j=0; j<matrix[i].length; j++) { vector[k] = matrix[i][j]; k++; } } write("matrix contain these values:\n"); for (var i=0; i<matrix.length; i++) { for (var j=0; j<matrix[i].length; j++) { write(matrix[i][j] + " "); } write("\n"); } write("\nvector contain these values:\n"); for (var i=0; i<vector.length; i++) { write(vector[i] + " "); }
(
)
{
}
[
]
"
;
=
+
-
*
!
/
%
&
|