编辑代码

//JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。 
console.log("Hello world!            -  js.jsrun.net ");

function getCurrentTimestampInSeconds() {
    return Math.floor(new Date().getTime() / 1000);
}

// 调用函数获取当前以秒为单位的时间戳
var currentTimestampInSeconds = getCurrentTimestampInSeconds();
console.log("当前以秒为单位的时间戳:", currentTimestampInSeconds);