I understand how objects are passed by reference in Javascript. In the following code my function changes a property of an object. It changes in the global scope as expected. I understand it. let a = {name:'blah1'};  function something(obj1) {   obj1.name = 'blah2';   console.log(obj1);  // prints {name:'blah2'} }  something(a); console.log(a); // prints {name:'blah2'}  In the following code, I rather pass another object to my function and make my first object equal to the second. This time it does not change in global scope. How can I understand this? let a = {name:'blah1'}; let b = {name:'blah2'};  function something(obj1, obj2) {   obj1 = obj2;   console.log(obj1); // prints {name:'blah2'} }  something(a,b); console.log(a); // prints {name:'blah1'}
The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?
What happens when you die? Diablo's first and second installments handled death differently, both in terms of exp\gold penalties and also in if you respawned or not or instead had to reload from an earlier point.  In Diablo III what happens when you die? Boats from Manaus, Brazil to Leticia, Colombia? I've heard of and met a few people who have done this route, and I hope to do it at the end of this year or early next year.  However, the descriptions were mostly sketchy, and I'm wondering if it's a regularly scheduled service, or more ad-hoc.  So I guess the question is, how can I find out which boats go from Manaus to Leticia, and when they go?  Ideally this wouldn't be a tour, but a 'locals' boat. The question asks it all really. When referring to a master's degree, do you use an apostrophe or not? That is, is it "a master's" or "a masters"? Product of two cyclic groups is cyclic iff their orders are co-prime Say you have two groups $G = \langle g \rangle$ with order $n$ and $H = \langle h \rangle$ with order $m$. Then the product $G \times H$ is a cyclic group if and only if $\gcd(n,m)=1$.  I can't seem to figure out how to start proving this. I have tried with some examples, where I pick $(g,h)$ as a candidate generator of $G \times H$. I see that what we want is for the cycles of $g$ and $h$, as we take powers of $(g,h)$, to interleave such that we do not get $(1,1)$ until the $(mn)$-th power. However, I am having a hard time formalizing this and relating it to the greatest common divisor.  Any hints are much appreciated! biblatex: Full Citations in Footnotes on Every Page How can I create this sort of bibliography using biblatex, ie, bibliography at the footer of every page? Probability of a 2 pair in poker Unzipping geoprocessing package (GPK) file? I was under the impression that all ArcGIS package files could have their contents examined and potentially used by renaming them to *.zip and unzipping them.  This impression is supported for map package (*.mpk) files by  to  and I thought I had used it succesfully on geoprocessing package (*.gpk) files in the past.  However, today I am unable to use a  which I think is because it was created using ArcGIS Desktop 10.5.x when I am using 10.2.1.01. When I rename this *.gpk as *.zip and try to examine it in Windows Explorer I get:     Compressed (zipped) Folders Error      Windows cannot open the folder      The Compressed (zipped) Folder ....zip is invalid.     Is it possible to unzip a geoprocessing package (*.gpk) file to see whether it may contain some useful ArcPy code when that *.gpk cannot be unpacked to provide a usable toolbox? Is there any scientific experiment that can lead us to conclude we live in 3 spatial dimensions without the premise of the conception of limited dimensions?  Thank you all who helped in the improvement of this question (which was not clear at first).   EDIT:  I know that this can be a little philosophical, but it is also a scientific question.  Let's consider the scenario where the mankind was not ever able to see.  Let's also consider that this limitation could be surpassed thus not limiting us to reach a scientific and technological knowledge "similar" to what we have today.  Would this civilization of blind people reach the conclusion that they are living in a 3D spatial world?  Is the sense of touch enough to reach that conclusion? Is there any scientific experiment that can lead us to that conclusion without the premise of the conception of limited dimensions?  Would it be easier, harder, or just different to reach a conclusion predicted by the M-Theory? (please do not focus only on this last question) What is the pronunciation of the possessive words that already end in s? Possible Duplicate:           My name is Greg — this is Greg 's post.  If my name ended with an 's', I am aware of the proper apostrophe usage (James&nbsp;→ James'), but how should this be pronounced?  Phonetically, am I Jameses best friend or James best friend? How can we differentiate between change and progress in the area of history and natural sciences? Getting command-not-found working under zsh Beamer text and image on the same slide How to prove: if $a,b \in \mathbb N$, then $a^{1/b}$ is an integer or an irrational number? Laplace transform of $1/t$ Trying to plot the sin(x) function, I get this result:    The MWE is here:  \documentclass{standalone} \usepackage{ pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot[samples=500]{sin(x)}; \end{axis} \end{tikzpicture} \end{document}   cos(x) looks like an inverted parabola and tan looks just like sin.  I'm using pdflatex and MiKTeX. Any ideas? Is there any difference between "offense" and "offence"? Limit FTP access only to the /var/www with vsftpd I am running vsftpd as ftp server on my linux (rasbian), I log in to the machine as a root user.  I would like to be still locked to using only /var/www, how can I configure vsftpd conf to accomplish it? Object Positions Reset On Blender Load How can I view all of the flights between two cities across all dates? I believe that the standard routes of carriers between two semi-major US cities always maintain the same route number (e.g. UA3271), and day of the week. I'm looking at planning travel for an interview, so dates are [currently] quite flexible (as in at least one month's range). Since that's the case, there are other constraints that go into my choice of flights. One would be the option to fly out of my home city, land in the interview location, conduct the interview, and fly out in the same day. I figure: if I can view the schedule for flights (i.e. routes) between the two cities, I can make an educated request for days of travel. Yes, I could likely work with the interview scheduler (and I will), but I'd like to be proactive in suggesting some dates to achieve my goal, as well as learn this skill for myself in the future. Thus:  Where can I view the daily routes and times for flights between two cities, on whatever rotating basis (e.g. day of the week) they may be on? Zero-pad digits in string