Created
June 20, 2016 07:07
-
-
Save ksakae1216/d446f76e63bc5ed00c4cfc38ac0262ac to your computer and use it in GitHub Desktop.
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
function myFunc(theObject) { | |
theObject.make = "Toyota"; | |
} | |
var mycar = {make: "Honda", model: "Accord", year: 1998}; | |
var x, y; | |
x = mycar.make; // x は "Honda" という値になる | |
myFunc(mycar); | |
y = mycar.make; // y は "Toyota" という値になる | |
console.log('x:' + x); //"x:Honda"が表示される | |
console.log('y:' + y); //"y:Toyota"が表示される |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment