Question: I've heard a lot of talk that enabling bitcode decreases the binary size of an app downloaded from the app store onto iOS 9. I haven't been able to find any resources on whether or not bitcode decreases the binary size on previous iOS versions.

Does enabling bitcode decrease the binary size on iOS 7 or iOS 8?

**EDIT**
According to this [thread](https://forums.developer.apple.com/thread/19743) App Slicing and Bitcode are two separate components. This would make sense considering the documentation for [App Thinning](https://developer.apple.com/library/tvos/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html) splits them into different sections. Is there any official word from Apple on iOS requirements for Bitcode?

Answer: 
Unfortunately as you can immagine the keyword `use` doesn't exists in javascript but to achieve the result you are looking for there are several ways.

So this was your example in which `totalPrice` is a function and `tax` is global.

```
// Your example
var tax = 10;
var totalPrice = function (quantity, price) {
    return (price * quantity) * (tax + 1.0);
};
var price = totalPrice(1, 1);
console.log ("Price YE is : " + price);

```

So I think that probably the solution who simulate more the keyword `use` is to generate a function which initialise `tax` in a sub scope and return a function:

```
// Example 1 return function
function generatePriceCalculator(tax) {
    return function(quantity, price) {
        if ("undefined" === typeof tax) {
            throw "tax is undefined";
        }

        return (price * quantity) * (tax + 1.0);
    };
};

var priceCalculator = generatePriceCalculator(20);
var price1 = priceCalculator(1, 1);
console.log ("Price Example 1 is : " + price1);

```

As you can see `generatePriceCalculator` is setting the value for `tax` in the function that return.

Another option is to generate an external function to call inside the closure.

```
// Example 2 function return tax
function getTax() {
    return 30;
}
var totalPrice2 = function (quantity, price) {
    var tax = getTax();
    return (price * quantity) * (tax + 1.0);
};
var price2 = totalPrice2(1, 1);
console.log ("Price Example 2 is : " + price2);

```

You can see all of them here: 

<https://jsfiddle.net/jo9yzoke/1/>
I don't think JS will ever offer what you want. PHP has a strict scope. If I define a variable inside a function it's limited to that function. Likewise, something defined outside that function is not implicitly available inside the function. `use`, like `global` simply changes where and when you can use a variable inside a specific scope.

JS puts everything in the global scope by default. In fact, it's a form of bizarro world, in that you limit a variable's scope to within a function you either have to have it as an argument or explicitly **limit** the scope to that variable

```
function bob(x) {
    // x is implicitly local
    y = 1; //global
    var z = 2; //local
}

```

In other words, all variables in JS are `use` declared implicitly.