Created
October 26, 2019 13:30
-
-
Save hillbilly300/f51ca8a9eb7e524eb3774a3c8a5f1462 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/sizoxu
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
<!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"> | |
let name = 'waqar hussain' | |
let nameCopy = name | |
console.log(name) | |
name = 'iftikhar hussain' | |
console.log(name) | |
console.log(nameCopy) | |
const user = { | |
name:'waqar hussain', | |
age: 23, | |
hobbies:['sports','reading'] | |
} | |
const newUser = Object.assign({},user) | |
console.log(user) | |
user.name = 'iftikhar hussain' | |
console.log(user) | |
console.log(newUser) | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">let name = 'waqar hussain' | |
let nameCopy = name | |
console.log(name) | |
name = 'iftikhar hussain' | |
console.log(name) | |
console.log(nameCopy) | |
const user = { | |
name:'waqar hussain', | |
age: 23, | |
hobbies:['sports','reading'] | |
} | |
const newUser = Object.assign({},user) | |
console.log(user) | |
user.name = 'iftikhar hussain' | |
console.log(user) | |
console.log(newUser)</script></body> | |
</html> |
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
let name = 'waqar hussain' | |
let nameCopy = name | |
console.log(name) | |
name = 'iftikhar hussain' | |
console.log(name) | |
console.log(nameCopy) | |
const user = { | |
name:'waqar hussain', | |
age: 23, | |
hobbies:['sports','reading'] | |
} | |
const newUser = Object.assign({},user) | |
console.log(user) | |
user.name = 'iftikhar hussain' | |
console.log(user) | |
console.log(newUser) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment