SOURCE

let num = "2024-10-24"
console.log(num.slice(0, 7))
console 命令行工具 X clear

                    
>
console