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

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -