If i alert x i can see the value. But from the below code, i can't seem to append the value to #result. What am i doing wrong. 

```
<div id="result"></div>
<button id="more">more</button>
<script type="text/javascript">

var x = 'abcde';
var y = x.substring(0,2);    
$('#more').click(function(){
$('#result').append(x);
});        

</script>

```