We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c040040 commit 31e8328Copy full SHA for 31e8328
exercises/concept/recycling-robot/.meta/exemplar.js
@@ -73,7 +73,7 @@ export function isElectronic(object) {
73
* @returns {boolean} whether the input is a non empty array.
74
*/
75
export function isNonEmptyArray(value) {
76
- return value instanceof Array && value.length > 0;
+ return Array.isArray(value) && value.length > 0;
77
}
78
79
/**
@@ -83,7 +83,7 @@ export function isNonEmptyArray(value) {
83
* @returns {boolean} whether the input is an empty array.
84
85
export function isEmptyArray(value) {
86
- return value instanceof Array && value.length === 0;
+ return Array.isArray(value) && value.length === 0;
87
88
89
0 commit comments