mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-30 04:47:03 +02:00
Fixed a few minor bugs with submitting solutions for Coding Contracts. Started on Getting STarted Guide for wiki
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// Checks whether an array is a 2D array.
|
||||
// For this, a 2D array is an array which contains only other arrays.
|
||||
// If one element in the array is a number or string, it is NOT a 2D array
|
||||
export function is2DArray(arr: any[]): boolean {
|
||||
if (arr.constructor !== Array) { return false; }
|
||||
|
||||
return arr.every((e) => { return e.constructor === Array; });
|
||||
}
|
||||
Reference in New Issue
Block a user