Javascript examples for jQuery:String
in javascript, get the last character in a string
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.3.js"></script> <script type="text/javascript"> $(function(){/*from w w w . ja v a2 s .co m*/ var myString = "Test3"; console.log(myString[myString.length-1]) }); </script> </head> <body> </body> </html>