JavaScript is gay
And this is why var person = { hair: "tunescool", eyes: true, height: "Avg", tattoos: "I'm Joe Biden's husband, Joe Biden" }...
JavaScript is gay
Articles in Computer Programming | By Huevos Rancheros
Published | Last Update
386 views, 1 RAM, and 2 comments
And this is why
var person = {
hair: "tunescool",
eyes: true,
height: "Avg",
tattoos: "I'm Joe Biden's husband, Joe Biden"
}
var personCopy = person
delete personCopy["eyes"]
console.log(person)
What do you think it will print?
If you said the below, you're correct:
{hair: "tunescool", height: "Avg", tattoos: "I'm Joe Biden's husband, Joe Biden"}
Something about personCopy only being a reference to the person object. So you're actually modyfying the person object.
So, even if you pass personCopy to a new module (file) in NodeJS, it will still edit the original which is now fuck knows where and your shit will bug.
The correct way to do it is probably this:
var personCopy = JSON.parse(JSON.stringify(person));
GAY
Share This Post















Users Who Have Downloaded More RAM:
Hash Brown (4 months ago) 🐏 ⨉ 1Posted by Huevos Rancheros 5 months ago
• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)
• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)
• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)
• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)
• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)
• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)
• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)
• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)
🕓 Posted at 31 August, 2020 13:33 PM PDT
Hash Brown (4 months ago) 🐏 ⨉ 1Posted by Huevos Rancheros 5 months ago
Edit History
• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)
• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)
• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)
• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)
• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)
• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)
• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)
• [2020-08-31 13:33 PDT] Huevos Rancheros (5 months ago)
🕓 Posted at 31 August, 2020 13:33 PM PDT
Read More:
JavaScript
Js
gay
- C U 6 Steps To Making Money With Bing
- C U The definitive guide to making $1000 a month
- C U JavaScript is gay
- C U Whatever Happened to Twitch Plays Pokémon? | The Rise (and Fall?) of the Church of Helix
- C U How Email Messages Work
- C U Biography of Markus "Notch" Persson: Creator of Minecraft
- C U Biography of Terry A. Davis: The Greatest Programmer to Ever Live
- C U The best way to learn Angular 2+ as fast as possible
- C U Python: What is it? What is it used for? What can you do with it?
I sell rare words
Interesting.
Also: https://stackoverflow.com/questions/518000/is-javascript-a-pass-by-reference-or-pass-by-value-language
Huevos Rancheros (5 months ago) 🐏 ⨉ 1Posted by August R. Garcia 5 months ago 🕓 Posted at 01 September, 2020 17:28 PM PDT
Sir, I can do you a nice SEO.
If you like Javascript, you are wrong.
"THAT DOG IS GETTING RAPED" - Terry A. Davis
Post a New Comment
To leave a comment, login to your account or create an account.
Do you like having a good time?
Register an Account
You can also login to an existing account or reset your password. All use of this site is subject to the terms of service and privacy policy.
Read Quality Articles
Read some quality articles. If you can manage to not get banned for like five minutes, you can even post your own articles.
View Articles →
Argue with People on the Internet
Use your account to explain why people are wrong on the Internet forum.
View Forum →
Vandalize the Wiki
Or don't. I'm not your dad.
View Wiki →
Ask and/or Answer Questions
If someone asks a terrible question, post a LMGTFY link.
View Answers →
Make Some Money
Hire freelancers and/or advertise your goods and/or services. Hire people directly. We're not a middleman or your dad. Manage your own business transactions.