javascript - How to get the last character of a string by coffeescript? -


i have string below:

str = "abcdefg123" 

i want last character(3), how make coffeescript?

i newcomer coffeescript, hope can me, in advance!

enjoy coffeescript destructuring assignement , splats:

str = "abcdefg123" [..., lastchar] = str alert lastchar 

Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -