题解 | #判断版本#

判断版本

https://www.nowcoder.com/practice/dcc4b011c86c454aa58cb1790a8cb760

{"html":"<!DOCTYPE html>\r\n<html>\r\n    <head>\r\n        <meta charset=utf-8>\r\n    </head>\r\n    <body>\r\n    \t\r\n        <script type=\"text/javascript\">\r\n            const _shouldUpdate = (oldVersion, newVersion) => {\r\n                // 补全代码\r\n                let oldversion = parseInt(oldVersion.split('.').join(''));\r\n                let newversion = parseInt(newVersion.split('.').join(''));\r\n                return newversion > oldversion;               \r\n            }\r\n        </script>\r\n    </body>\r\n</html>","css":"/* html, body {\\n\\twidth: 100%;\\n\\theight: 100%;\\n\\tmargin: 0;\\n\\tpadding: 0;\\n} */","js":"// 请在这里输入代码"}

全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务