Skip to content

Instantly share code, notes, and snippets.

@kozo002
Created February 3, 2012 09:55
Show Gist options
  • Select an option

  • Save kozo002/1729433 to your computer and use it in GitHub Desktop.

Select an option

Save kozo002/1729433 to your computer and use it in GitHub Desktop.
JavaScript勉強会 2012/2/3
<script type="text/javascript">
var fruits = ['apple', 'banana'];
var index = 1;
console.log(fruits[index]);
var fruits2 = [['apple', 5], 'banana'];
console.log(fruits2[0][0]);
</script>
<script type="text/javascript">
var num = {one: 1, two: ['hoge', 'huga']};
console.log(num.two[0]);
[
'hoge',
'huga'
];
</script>
<script type="text/javascript">
function hoge() {
var hensu = 2;
return hensu;
}
var uke = hoge();
console.log(uke);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment