This repository has been archived by the owner on Sep 9, 2019. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: array and directive string expression support
- Loading branch information
Showing
9 changed files
with
60 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const array = ["A", "B", "C"]; | ||
array.unshift("S"); // "S"を先頭に追加 | ||
console.log(array); // => ["S", "A", "B", "C"] | ||
const shiftedItem = array.shift(); // 先頭の要素を削除 | ||
console.log(shiftedItem); // => "S" | ||
console.log(array); // => ["A", "B", "C"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const array = ["A", "B", "C"]; | ||
array.unshift("S"); // "S"を先頭に追加 | ||
|
||
assert.deepStrictEqual(array, ["S", "A", "B", "C"]); // => ["S", "A", "B", "C"] | ||
|
||
const shiftedItem = array.shift(); // 先頭の要素を削除 | ||
|
||
assert.strictEqual(shiftedItem, "S"); // => "S" | ||
|
||
assert.deepStrictEqual(array, ["A", "B", "C"]); // => ["A", "B", "C"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
console.log(0b0000000000000000000000000001001); // => 9 | ||
// Number#toStringメソッドを使うことで2進数表記の文字列を取得できる | ||
console.log((9).toString(2)); // => "1001" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
assert.strictEqual(0b0000000000000000000000000001001, 9); // => 9 | ||
// Number#toStringメソッドを使うことで2進数表記の文字列を取得できる | ||
|
||
assert.strictEqual(9 .toString(2), "1001"); // => "1001" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"文字列"; // => "文字列" | ||
"\u6587\u5b57\u5217"; // => "文字列" | ||
"𩸽"[0]; // => "\uD867" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
assert.strictEqual("文字列", "文字列"); // => "文字列" | ||
|
||
assert.strictEqual("\u6587\u5b57\u5217", "文字列"); // => "文字列" | ||
|
||
assert.strictEqual("𩸽"[0], "\uD867"); // => "\uD867" |