Skip to content

Commit 31e8328

Browse files
Update exemplar.js
1 parent c040040 commit 31e8328

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/concept/recycling-robot/.meta/exemplar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export function isElectronic(object) {
7373
* @returns {boolean} whether the input is a non empty array.
7474
*/
7575
export function isNonEmptyArray(value) {
76-
return value instanceof Array && value.length > 0;
76+
return Array.isArray(value) && value.length > 0;
7777
}
7878

7979
/**
@@ -83,7 +83,7 @@ export function isNonEmptyArray(value) {
8383
* @returns {boolean} whether the input is an empty array.
8484
*/
8585
export function isEmptyArray(value) {
86-
return value instanceof Array && value.length === 0;
86+
return Array.isArray(value) && value.length === 0;
8787
}
8888

8989
/**

0 commit comments

Comments
 (0)