Since in Javascript a string is a char array, you can access the last character by the length of the string.
var lastChar = myString[myString.length -1];
Related Posts:
- How do I check if string contains substring? [duplicate]
- How do I check if string contains substring?
- How can I get the last character in a string?
- Escaping HTML strings with jQuery
- How do I make the first letter of a string uppercase in JavaScript?
- Creating multiline strings in JavaScript
- Uncaught ReferenceError: jQuery is not defined [duplicate]
- syntax error: unexpected token <
- Error OPTIONS net::ERR_CONNECTION_REFUSED
- Uncaught ReferenceError: jQuery is not defined [duplicate]
- JQuery – $ is not defined
- Download File Using JavaScript/jQuery
- How to deal with net::ERR_SSL_PROTOCOL_ERROR?
- Disabling and enabling a html input button
- Check if checkbox is checked with jQuery
- How can I get the data-id attribute?
- document.getElementById vs jQuery $()
- How to import jquery using ES6 syntax?
- How to filter an array/object by checking multiple values
- Check if a variable is a string in JavaScript
- Check if a variable is a string in JavaScript
- Infinite Scrolling in Asp.Net MVC with jQuery / AJAX Issues
- What are the difference between $(document).bind(‘ready’, function) and $(document).ready(function() {})
- How can jQuery deferred be used?
- Uncaught TypeError : cannot read property ‘replace’ of undefined In Grid
- What does on() in JavaScript do?
- How to use php code in javascript
- Use images like checkboxes
- How to read xml file contents in jQuery and display in html elements?
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- How to print elements from array with javascript
- How can I print using JQuery
- Loading local JSON file
- How to check all checkboxes using jQuery?
- Uncaught TypeError: Cannot read property ‘msie’ of undefined
- Delete first character of a string in Javascript
- How to hide a div with jQuery?v
- How do I set/unset a cookie with jQuery?
- Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
- keycode 13 is for which key
- Equivalent of jQuery .hide() to set visibility: hidden
- JQuery Datatables : Cannot read property ‘aDataSort’ of undefined
- TypeError: $(…).DataTable is not a function
- jQuery explode string like PHP
- Anagrams finder in javascript
- Validate date in dd/mm/yyyy format using JQuery Validate
- Javascript/Jquery Convert string to array
- How to interpolate variables in strings in JavaScript, without concatenation?
- Simulate Keypress With jQuery
- Adding options to a
- String.Format not work in TypeScript
- jQuery Ajax POST example with PHP
- Setting and getting localStorage with jQuery
- How to get current date in jQuery?
- Print the contents of a DIV
- How to Scroll Down – JQuery
- Embedding instagram webpage inside an iframe
- Do something if screen width is less than 960 px
- Javascript isnull
- Set value to currency in
- Uncaught TypeError: Cannot read property ‘toUpperCase’ of undefined
- SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
- HTML Entity Decode
- jQuery remove options from select
- jquery beforeunload when closing (not leaving) the page?
- How do I pass the this context to a function?
- How to use z-index in svg elements?
- What is the best way to detect a mobile device?
- How to filter JSON Data in JavaScript or jQuery?
- Highlight a word with jQuery
- Get querystring from URL using jQuery [duplicate]
- jQuery checkbox change and click event
- jQuery selectors on custom data attributes using HTML5
- How do I refresh a DIV content?
- TypeError: abc.getAttribute is not a function
- Error: TypeError: $(…).dialog is not a function
- jQuery sort elements using data id
- getContext is not a function
- How to fire an event on class change using jQuery?
- navigator.geolocation.getCurrentPosition sometimes works sometimes doesn’t
- Strip HTML from Text JavaScript
- Uncaught SyntaxError: Unexpected token with JSON.parse
- How to open a Bootstrap modal window using jQuery?
- window.location.replace() not working to redirect browser
- jquery to validate phone number
- Closing Bootstrap modal onclick
- Fire oninput event with jQuery
- What’s a Good Javascript Time Picker?
- Cannot read property ‘preventDefault’ of undefined in javascript error
- How to set “style=display:none;” using jQuery’s attr method?
- How to dequeue a script?
- WordPress 5.5 – ReferenceError: commonL10n is not defined error
- Jquery function working in Chrome Console but not in the code [closed]
- List of JS Events for Widgets?
- Uncaught ReferenceError: jQuery is not defined – although jQuery is loaded [closed]
- Change each text after 4 second and each image after 2 second
- Putting custom html/js page into Elementor as it’s own block
- wp post_tag change minlength
- How to locate the js code and php code for certain function?
- Access jQuery tabs from primary menu while adding/removing class on tab container elements (accessing diff. tabs/tab content via primary menu items)