I've read that arrays and objects are "being passed by reference". But I've encountered behavior, which confuses me.  In this piece of code, everything works as I would expect  let first = [1, 2, 3, 4, 5]; let second = first; first.push(10); console.log(first); //[ 1, 2, 3, 4, 5, 10 ] console.log(second); //[ 1, 2, 3, 4, 5, 10 ]   I have troubles understanding the following one  let third = [1, 2, 3, 4, 5]; let forth = third; third = [11, 12]; console.log(third); //[ 11, 12 ] console.log(forth); //[ 1, 2, 3, 4, 5 ]   I would expect both variables to be equal, but it works as I'm operating primitives, not an array.
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?
Please help understanding the difference between force and kinetic energy for an object hitting a wall? If a car hits a wall at a speed of $v$, and an identical car hits a wall at a speed of $2\,v$, with the kinetic energy equation $E_K = \frac{1}{2}mv^2$ (the speed goes from $v$ to $0$) the second car will lose 4 times the energy, and therefore cause 4 times the damage, but with the force equation $F = ma$ (the car hits the wall and decelerates), it will hit with 2 times the force, and cause 2 times the damage.  How can this be explained? Interface vs Base class Unable to install "": snap "" has "install-snap" change in progress I just finished the installation of the Ubuntu 18.04, but whenever I try to install any application from Ubuntu Software the same error occurs (for example "vlc"):     unable to install "vlc": snap "vlc" has "install-snap" change in progress   I hope somebody can tell me what I've done wrong. When $z\neq 0$, $\arg z$ is defined to be the set $\{\theta \in \mathbb{R} : z=|z|e^{i\theta}\}$.  What if $z=0$? Usually does one leave the argument of $0$ undefined? Or is $\arg 0 = \mathbb{R}$? Finding the solution of the congruence $4x\equiv16\pmod{26}$ Solve the congruence   $$4x\equiv16\mod{26}.$$  How do I find the solution to this? I have tried by the euclidean algorithm but the gcd is not $1$ so it doesn't work.  $$\begin{align} 26&amp;=&amp;6&amp;\times4&amp;+2\\ 4&amp;=&amp;2&amp;\times2&amp;+0 \end{align}$$  Note: I understand we can see that $4$ and $17$ are solutions but how would I work this out algorithmically? Can I define keyboard shortcuts using the Super key? Access is denied because the NTFS volume is already exclusively opened On proving that a finitely generated group has a finite number of subgroups with index $n$. Theorem: If $G$ is a finitely generated group, then it has a finite (maybe zero) number of subgroups of index $n$ for any $n\in \mathbb{N}$.   is a sketch of a proof. It consists of assuming such a subgroup $H$ exists, and allowing $G$ to act on $G/H$ by left multiplication. Such action defines a homomorphism $$\phi :G \rightarrow \text{Sym}(G/H)\cong \mathbb{S}_n$$  If $G=\langle g_1, \ldots ,g_r\rangle$, then the homomorphism is uniquely determined by where it sends the generators $g_i$. In particular, there are at most $(n!)^r$ such homomorphisms.  The last step of the proof requires one to notice that a different subgroup $H'$ of index $n$ in $G$ would produce a different homomorphism, and here is where I'm struggling. I've been able to show that $\text{ker}(\phi )=\text{core}(H)$, yet haven't been able to rule out the possibility of $\text{core}(H)=\text{core}(H')$. Responsive Breakpoints? Twitter Bootstrap uses these break points for responsive design:  Large Display: 1200px Default: 980px Tablet: 768px Mobile: 480px  A client said they are using 1280px for their Large Display breakpoint.  Is there an industry standard for these or are they just made up as we go right now? How to insert text into a root-owned file using sudo? A question about using the "v-ing" verbs To native speakers, normally do you use adverbs to modify these v-ing worlds especially when they are the objects of the verbs?  Like:      I regret swimming hurriedly     Not      I regret hurried swimming.      Right? And what about these two sentences:     I regret stamp-collecting     or     I regret collecting stamps   Besides, when using these words, it still retains the verbal characteristics right? Like:       The house needs a careful cleaning.     has the same meaning with       The house needs carefully cleaning.     or       The house needs to be cleaned carefully.   (SOMETHING like passive voice) Group of order 15 is abelian How do I prove group of order 15 is abelian?  Is there any general strategy to prove that a group of particular order(composite order) is abelian? Too many requests? I went to stackexchange.com and clicked on SO.  After a few minutes I got a message saying "We have detected too many requests from this IP.  If this is an error contact us."  That was the second SE page I tried to visit.  Second only to SE.com  I moved to another machine and it's working now.  The first machine usually works, I don't know if a got assigned a blacklisted IP or what.  Anyone know what's going on?  EDIT: I would really rather not post my IP on the web, but if a diamond or dev asks I'll email it.  EDIT 2: I looked at badp's dupe suggestion and can verify that I have no scripts frequently calling SO. Group of even order contains an element of order 2 How does $e^{i x}$ produce rotation around the imaginary unit circle? Euler’s formula states that $e^{i  x} = \cos(x) + i \sin(x)$.  I can see from the MacLaurin Expansion that this is indeed true; however, I don’t intuitively understand how raising $e$ to the power of $ix$ produces rotation.  Can anyone give me an intuitive understanding? Windows Active Directory naming best practices? This is a  about Active Directory domain naming.   After experimenting with Windows domains and domain controllers in a virtual environment, I've realized that having an active directory domain named identically to a DNS domain is bad idea (Meaning that having example.com as an Active Directory name is no good when we have the example.com domain name registered for use as our website).   , but I'm still not sure about what other rules there are around naming Active Directory domains.  Are there any best practices on what an Active Directory name should or shouldn't be? Recovering broken or deleted NTFS partitions Web designer's link back to own website (rel="designer" / rel="nofollow") How do I enable the "Universe" repository? When I can scroll down far enough to have the hot network questions overlap the footer (because my question is short) there is no background under the text:    Could they either be given a white background: (just disable the transparency option)    Or stop at the footer:      This also happens with the help text on some sites, as per this bug report:     Ubuntu 14.04.1 (Latest LTS Version), . Same problem with  and .  Windows 10 Pro,  and .  (Images linked to screenshot of browser)  My question is different from  because my issue is the lack of background on the footer.   I think there was a site redesign?