js-截取字符串的后几位?

var str="abcdef";//截取后2位
str.substring(str.length-2);


输出结果是ef
原文地址:https://www.cnblogs.com/snowbxb/p/13706517.html