Please observe the above images, all I want is to get a present time using “new Date()” for that I am using below code to get a output.
const currentTime = new Date();
const hours = currentTime.getHours();
const minutes = currentTime.getMinutes();
const seconds = currentTime.getSeconds();
let time_time = ${hours}:${minutes}:${seconds}
console.log(time_time);
It is working fine on vs code but not in our platform functions. can anyone please help me on this!