WordPress Echo admin ajax URL

<script type="text/javascript">
    var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
</script>
Naughty Newt