For example suppose I have the following within my HTML
<script src="/socket.io/socket.io.js"></script>
The script defines a variable named socket. Immediately below I have the following
<script src="/javascripts/script.js" type="text/javascript"></script>
Within script.js I try to access socket and get a not defined error. However if I use an inline script I can access the variable. How can I access 'socket' from within script.js?
$(document).ready()or something.socket.io.js?io, but not one called socket.