I have done a little test for a project of mine. I have made a variable inside a function, then in a different function I am trying to console log one of those functions. However, my problem is that it is saying X (my variable) is undefined.  I have researched this quite a lot and I haven't found any good answers, I have researched scopes and I have tried to make it corresponding to what I found under that, but even then it doesn't work.  function inputs(){     var x = 19;     return x; }  function output(){     console.log(x); }  output();   I want it to log x to the console, but it says x is undefined.  Thank you in advance!
What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?
When using \textsc, LaTeX issues warning: Font shape `OT1/cmr/bx/sc' undefined This is what happens:  sudo apt-get install vlc Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package vlc   Please help. I would also like to know when this error occurs, I've seen it before too. Ever since I upgraded to 13.10, the software updater does not show all the available updates. Some will appear and can be installed just fine, but once it claims that all software is up to date, using sudo apt-get upgrade shows that there are still more packages waiting to be updated. I can update them via the command line, but that only solves things temporarily. I'm not sure why some show up and others don't. How can I make Update Manager update all packages?  Update-manager shows this:    But apt-get shows this:   Thanks! US Salary Transfered to Indian Acc and Tax Relation I am on an H1b visa working and receiving a salary in the US. I have transferred approximately $15-20k to my account in India Account (not an NRE account).    How would this transfer affect my taxes in US and India. How can I avoid tax on the money that I have transferred. Would any investments help save taxes? Do I need to declare anything? If so, where ? I have currently a strange problem on debian (wheezy/amd64).  I have created a chroot to install a server (i can't give any more detail about it, sorry). Let's call its path /chr_path/. To make things easy, I have initialized this chroot with a debootstrap (also wheezy/amd64).  All seemed to work well inside the chroot but when I started the installer script of my server I got : zsh: Not found /some_path/perl (the installer includes a perl binary for some reasons)  Naturally, I checked the /some_path/ location and I found the "perl" binary. file in chroot environment returns :  /some_path/perl ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped   The file exists, seems ok, has correct rights. I can use file, ls, vim on it but as soon as I try to execute it - ./perl for example - I get : zsh: Not found ./perl.  This situation is quite understandable for me. Moreover :   I can execute other basic binaries (/bin/ls,...) in the chroot without getting errors I have the same problems for other binaries that came with the project When I try to execute the binary from the main root (/chr_path/some_path/perl), it works. I have tried to put one of the binaries with a copy of my ls. I checked that the access rights were the same but this didn't change anything (one was working, and the other wasn't) How to force the evaluation of a lambda term in haskell to the strong normal form How does CoffeeScript's existential operator work? Make "axis cs" the default coordinate system in a PGFPlots plot I would like to know if there is a way to specify axis cs to be the default coordinate system inside a plot in PGFPlots, so I don't have to type axis cs: in front of every coordinate pair. Here's a MWE that shows what I mean (the actual plot is irrelevant).  \documentclass{article}  \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture}  \begin{axis}[               xmin=0,               xmax=80,               ymin=0,               ymax=80,               grid=major,              ]   \fill [green, opacity=0.5] (axis cs:14,14) -- (axis cs:80,47) -- (axis cs:80,80) -- (axis cs:47,80) -- cycle;   \fill [red, opacity=0.5] (0,0) -- (axis cs:80,0) -- (axis cs:80,47) -- (axis cs:14,14) -- (axis cs:47,80) -- (axis cs:0,80) -- cycle;   \draw [thick] (axis cs:47,80) -- (axis cs:14,14) -- (axis cs:80,47);  \end{axis} \end{tikzpicture}  \end{document} Convergence of sequence given by $x_1=1$ and $x_{n+1}=x_n+\sqrt{x_n^2+1}$ Be $(x_n)_n\ge 1 $  such that $x_1=1$ and $x_{n+1}=x_n+\sqrt{x_n^2+1}$ for every $n\ge 1$. Prove that the sequence $y_n=(2^n/x_n)_n \ge 1$ is convergent and find it s limit.  Being positive and decreasing, $y_n$ is clearly convergent. But finding it's limit really put me intro trouble. Any help?  Thank you! How to prevent an email from accidentally being forwarded? Is it possible to prevent an email from being forwarded, or to have sensitive information automatically removed when reply-all/forward is pressed?  For example, a Google Calendar invitation includes a link to directly accept/reject the event. However, if someone clicks reply-all, and they keep the HTML formatting, the link will be shared with everyone else who received the invitation, and they can change the user's RSVP. (Specifically, the email is sent only to you, but has a "To:" header showing all invitees, so the problem remains.)  What can be done to ensure that the recipient does not accidentally share the sensitive link? Would it be possible with some MIME trickery or with a semi-standard header? Or is the best practice to refrain from including such "direct action" links when someone might be tempted to reply-all? Can we calculate the standard error of prediction just based on simple linear regression output? The standard error of prediction in simple linear regression is $\hat\sigma\sqrt{1/n+(x_j-\bar{x})^2/\Sigma{(x_i-\bar{x})^2}}$.  My question is to calculate the standard error of prediction for $pop=1029$ just based on the following regression output. I can get all except $\bar{x}$. And I also know how to calculate the approximate standard error of prediction based on the standard errors of intercept and coefficient of $pop$, ignoring their correlation. Is every Lie subgroup of $SU(2)$ closed? Create an encrypted ZIP file in Python I have some programs running on start-up like . UAC prompts every time the Windows starts. How can I set a program to make sure that no intervening prompt would appear during start-up? Network simplex method, leaving and entering variables Could someone give me a hint on this question, which is a past exam question:     Under what circumstances will an entering variable in the network simplex method be the same as the leaving variable?   Thank you for your help. Is there a correct gender-neutral singular pronoun ("his" vs. "her" vs. "their")? Is there a pronoun I can use as a gender-neutral pronoun when referring back to a singular noun phrase?  Each student should save his questions until the end. Each student should save her questions until the end. Galactic Rotation Speeds - Ehrenfest Paradox, Gravitational time dilation, Dark Matter - all of the above? How can I get a copy of a Canadian visa refusal letter? When I have .txt files or .py files, I can Quick Look those files in Finder. I have .jl files that are codes written in the Julia Language. Of course they are text files. They will open in a text editor like Sublime Text. How can I Quick Look these .jl files in Finder? Is it possible that galaxies' redshift is caused by something else than the expansion of space? I was thinking that maybe photons loss energy naturally when they travel great distances.  Or maybe the mass of all matter is increasing over time and therefore photons emitted in the past are necessarily less energetic.  Or is the expansion of space backed up by so much other evidences that trying to find another explanation is completely foolish?