length


if you want to know how many characters a string has or a variable (var) in javascript you can find that information by using the str.length in your javascript. for example, lets say i have a variable called wallpaperama:

var string= 'wallpaperama';

wallpaperama.html
<script language="javascript" type="text/javascript">
var string= 'wallpaperama';
alert(string.length);
</script>


if you run that script, you will get a popup windows says: 12
the best way to learn is to actually do it so if you want to try it and give it a test run, open a text editor like notepad, copy and paste the code above and save the file as wallpaperama.html then open it with your browser and see it in action. its much more fun that way. but if you are a lazy bum, i will show you a demo





var string= 'wallpaperama';
Put Your Mouse Here to see how many letters my string has