mirror of
https://github.com/swc-project/swc.git
synced 2024-12-30 17:15:11 +03:00
c6b22c57f8
Co-authored-by: Fábio Santos <fabiosantosart@gmail.com>
6 lines
135 B
JavaScript
6 lines
135 B
JavaScript
function f(s) {
|
|
return s.split(/[\\/]/);
|
|
}
|
|
var r = f("A/B\\C\\D/E\\F");
|
|
console.log(r[5], r[4], r[3], r[2], r[1], r[0], r.length);
|