Created
June 13, 2018 04:08
-
-
Save AminBusiness/469d4d7f6b2b60a380c83a4c6d81ec78 to your computer and use it in GitHub Desktop.
// source https://jsbin.com
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
var person = { | |
firstName: "John", | |
lastName : "Doe", | |
id : 5566, | |
}; | |
person.name = function() { | |
return this.firstName + " " + this.lastName; | |
}; | |
document.getElementById("demo").innerHTML = | |
"My father is " + person.name(); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
var person = { | |
firstName: "John", | |
lastName : "Doe", | |
id : 5566, | |
}; | |
person.name = function() { | |
return this.firstName + " " + this.lastName; | |
}; | |
document.getElementById("demo").innerHTML = | |
"My father is " + person.name(); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript"> | |
var person = { | |
firstName: "John", | |
lastName : "Doe", | |
id : 5566, | |
}; | |
person.name = function() { | |
return this.firstName + " " + this.lastName; | |
}; | |
document.getElementById("demo").innerHTML = | |
"My father is " + person.name(); | |
</script></body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment