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 88d661d commit 9d73af0Copy full SHA for 9d73af0
javascript/src/2695-array-wrapper.js
@@ -51,14 +51,14 @@ const ArrayWrapper = function(nums) {
51
52
/**
53
* @return {number}
54
- */
+***/
55
ArrayWrapper.prototype.valueOf = function() {
56
return this.nums.reduce((agg, num) => agg + num, 0);
57
}
58
59
60
* @return {string}
61
62
ArrayWrapper.prototype.toString = function() {
63
return `[${this.nums.join(',')}]`;
64
@@ -69,6 +69,6 @@ ArrayWrapper.prototype.toString = function() {
69
* obj1 + obj2; // 10
70
* String(obj1); // "[1,2]"
71
* String(obj2); // "[3,4]"
72
73
74
module.exports = ArrayWrapper;
0 commit comments