SOURCE

/**
 * 灵雀云前端面试题:版本号排序
 * 实现 sortVersions 函数,使测试用例能够返回正确的结果
 */
const versions = ['2.01', '1.10', '1.9.10', '1.10.2', '2.0', '1'];

function sortVersions(versions) {
    
}



console.log(sortVersions(versions));
// ["1","1.9.10","1.10","1.10.2","2.0","2.01"]
console 命令行工具 X clear

                    
>
console