This file contains hidden or 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
| var array = ['a', 'b', 'c', 'b']; | |
| var index = array.indexOf('b'); | |
| console.log(index); // 1 | |
This file contains hidden or 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
| var array = ['a', 'b', 'c', 'b']; | |
| var index = array.lastIndexOf('c'); | |
| console.log(index); // 2 | |
This file contains hidden or 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
| var array = ['c', 'a', 'b', 'c', 'b']; | |
| var index = array.lastIndexOf('c'); | |
| console.log(index); // 2 | |
This file contains hidden or 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
| var array = ['a', 'b', 'c', 'd']; | |
| var slice1 = array.slice(2, 3); | |
| var slice2 = array.slice(1, 4); | |
| console.log(array); // ['a', 'b', 'c', 'd'] | |
| console.log(slice1); // ['c'] | |
| console.log(slice2); // ['b', 'c', 'd'] |
This file contains hidden or 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
| var array = ['a', 'b', 'c', 'd']; | |
| array.shift(); | |
| console.log(array); // ['b', 'c', 'd'] | |
This file contains hidden or 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
| var array = ['a', 'b', 'c', 'd']; | |
| array.pop(); | |
| console.log(array); // ['a', 'b', 'c'] | |
This file contains hidden or 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
| var array = ['a', 'b', 'c', 'd']; | |
| array.splice(1, 1); // 二番目から一つ削除 | |
| console.log(array); // ['a', 'c', 'd'] | |
| var array = ['a', 'b', 'c', 'd']; | |
| array.splice(1, 2); // 二番目から二つ削除 |
This file contains hidden or 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
| var array = ['a', 'b', 'c']; | |
| array = []; | |
| console.log(array); // [] | |
This file contains hidden or 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
| var array = ['a', 'b', 'c']; | |
| array[0] = 'd'; | |
| console.log(array); //['d', 'b', 'c']; | |
This file contains hidden or 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
| <?php | |
| $sql = $modelsManager->createBuilder() | |
| ->from('Some\Robots') | |
| ->getQuery() | |
| ->getSql(); | |
| var_dump($sql); | |