in javascript I'm using Internet Explorer 7.
Trying to get the first element of a string in JavaScript
var x = 'somestring';
alert(x[0]); // returns undefined
What's wrong with this code?
javascript
Write the charAt function.
var x = 'some string';
alert(x.charAt(0)); // alerts 's'
© 2024 OneMinuteCode. All rights reserved.