Tried to read text from a local text file using jquery but if want to return a value from $.get, its not working. So I trie it like this
 function read() {
        var result=0;
            $.get("version.txt?_ts=" + new Date().getTime(), function (data) {
                var y1 = parseInt(data[0]);
                var y2 = parseInt(data[1]);
                var y = (y1 * 10) + y2;
                result=y;
            });
         return result;
        }
        function drr() {
            var d = read();
            document.write(d);
        }
but result value is remaining 0. could someone helpme with this
 
     
     
    