File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change 1
- //
2
- // This is only a SKELETON file for the 'Matrix' exercise. It's been provided as a
3
- // convenience to get you started writing code faster.
4
- //
5
-
6
1
export class Matrix {
7
- constructor ( ) {
8
- throw new Error ( "Remove this statement and implement this function" ) ;
2
+ constructor ( string ) {
3
+ this . matrix = string ;
4
+ }
5
+
6
+ splitInRows ( ) {
7
+
8
+ const rowsFirst = this . matrix . split ( '\n' ) . map ( entry => entry . split ( '' ) )
9
+ // .map( entry => parseInt(entry))
10
+ console . log ( rowsFirst )
9
11
}
10
12
11
13
get rows ( ) {
12
- throw new Error ( "Remove this statement and implement this function" ) ;
14
+ const test = this . splitInRows ( )
15
+ // console.log(this.splitInRows())
16
+ return test
13
17
}
14
18
15
19
get columns ( ) {
16
- throw new Error ( "Remove this statement and implement this function" ) ;
20
+
17
21
}
18
22
}
You can’t perform that action at this time.
0 commit comments