I have a simple question. I came across some code in a project that defines a const in a function.

function doSomething():void{
        const my_var:String = "my_var"
        
        var buffer:String = '';

        for(var i:int = 0 ; i<list.length ; i++){
                buffer += list[i] + my_var
        }
}

What is the difference compared to this:

function doSomething():void{
        var my_var:String = "my_var"
        var buffer:String = '';

        for(var i:int = 0 ; i<list.length ; i++){
                buffer += list[i] + my_var
        }
}

Regards,

Jiri
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to