Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.

Commit 7165c76

Browse files
committed
More fixes to Expected output comments in JS examples.
1 parent 8005ce5 commit 7165c76

File tree

13 files changed

+22
-21
lines changed

13 files changed

+22
-21
lines changed

live-examples/js-examples/classes/classes-static.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class ClassWithStaticMethod {
77
console.log('Class static initialization block called');
88
}
99
}
10+
// Expected output: "Class static initialization block called"
1011

1112
console.log(ClassWithStaticMethod.staticProperty);
1213
// Expected output: "someValue"
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
console.log(JSON.stringify({ x: 5, y: 6 }));
2-
// Expected output: '{"x":5,"y":6}'
2+
// Expected output: "{"x":5,"y":6}"
33

44
console.log(
55
JSON.stringify([new Number(3), new String('false'), new Boolean(false)]),
66
);
7-
// Expected output: '[3,"false",false]'
7+
// Expected output: "[3,"false",false]"
88

99
console.log(JSON.stringify({ x: [10, undefined, function () {}, Symbol('')] }));
10-
// Expected output: '{"x":[10,null,null,null]}'
10+
// Expected output: "{"x":[10,null,null,null]}"
1111

1212
console.log(JSON.stringify(new Date(2006, 0, 2, 15, 4, 5)));
13-
// Expected output: '"2006-01-02T15:04:05.000Z"'
13+
// Expected output: ""2006-01-02T15:04:05.000Z""

live-examples/js-examples/number/number-tolocalestring.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ console.log(eArabic('123456.789'));
99
// Expected output: "123456.789"
1010

1111
console.log(eArabic(NaN));
12-
// Expected output: "ليس رقم"
12+
// Expected output: "ليس رقم"

live-examples/js-examples/proxyhandler/proxyhandler-ownkeys.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ const proxy1 = new Proxy(monster1, handler1);
1414

1515
for (const key of Object.keys(proxy1)) {
1616
console.log(key);
17-
// Expected output: "_age"
18-
// Expected output: "eyeCount"
1917
}
18+
// Expected output: "_age"
19+
// Expected output: "eyeCount"

live-examples/js-examples/set/set-prototype-add.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ set1.add(13);
66

77
for (const item of set1) {
88
console.log(item);
9-
// Expected output: 42
10-
// Expected output: 13
119
}
10+
// Expected output: 42
11+
// Expected output: 13

live-examples/js-examples/set/set-prototype-entries.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ const iterator1 = set1.entries();
66

77
for (const entry of iterator1) {
88
console.log(entry);
9-
// Expected output: Array [42, 42]
10-
// Expected output: Array ["forty two", "forty two"]
119
}
10+
// Expected output: Array [42, 42]
11+
// Expected output: Array ["forty two", "forty two"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
console.log(String.fromCodePoint(9731, 9733, 9842, 0x2f804));
2-
// Expected output: "☃★♲"
2+
// Expected output: "☃★♲你"

live-examples/js-examples/string/string-lastindexof.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ const paragraph = "I think Ruth's dog is cuter than your dog!";
33
const searchTerm = 'dog';
44

55
console.log(
6-
`Index of the last ${searchTerm} is ${paragraph.lastIndexOf(searchTerm)}`,
6+
`Index of the last "${searchTerm}" is ${paragraph.lastIndexOf(searchTerm)}`,
77
);
88
// Expected output: "Index of the last "dog" is 38"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const dotted = 'İstanbul';
22

33
console.log(`EN-US: ${dotted.toLocaleLowerCase('en-US')}`);
4-
// Expected output: "i̇stanbul"
4+
// Expected output: "EN-US: i̇stanbul"
55

66
console.log(`TR: ${dotted.toLocaleLowerCase('tr')}`);
7-
// Expected output: "istanbul"
7+
// Expected output: "TR: istanbul"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const greeting = ' Hello world! ';
22

33
console.log(greeting);
4-
// Expected output: " Hello world! ";
4+
// Expected output: " Hello world! "
55

66
console.log(greeting.trimEnd());
7-
// Expected output: " Hello world!";
7+
// Expected output: " Hello world!"

0 commit comments

Comments
 (0)