Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

get last character of string javascript

str.charAt(str.length-1) 
Comment

javascript last character of a string

const myString = "linto.yahoo.com.";
const stringLength = myString.length; // this will be 16
console.log('lastChar: ', myString.charAt(stringLength - 1)); // this will be the string
 Run code snippet
Comment

last index of string in javascript

str[str.length-1]
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript get elements by multiple class names 
Javascript :: react useeffect on change props 
Javascript :: javascript max date 
Javascript :: slice() in js 
Javascript :: lowest common ancestor leetcode 
Javascript :: js variable for key obj 
Javascript :: jquery limit words in string 
Javascript :: js spread operator component example 
Javascript :: convert matrix string to matrix javascript 
Javascript :: regex match between quotes without escape 
Javascript :: vuejs enter phone with country flag 
Javascript :: how to inspect element attributes in cypress 
Javascript :: set map to local storage javascript 
Javascript :: javascript array de imagenes 
Javascript :: how to convert json to javascript object 
Javascript :: regex contains special characters javascript 
Javascript :: socket-client-io for reconnection in js or javascript 
Javascript :: password regex javascript 
Javascript :: yarn install python2 not found 
Javascript :: prisma where not in array 
Javascript :: batch mkdir 
Javascript :: dropzone upload on one file 
Javascript :: submit form jquery browser check 
Javascript :: how to get keys in an object javascript 
Javascript :: filepond remove file after upload 
Javascript :: npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. 
Javascript :: node js code for saving first middle and last name 
Javascript :: jquery get label text only for input 
Javascript :: closure 
Javascript :: flatlist react native keyextractor 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =