javascript หาจำนวนวัน แต่มัน console.log ออกมาไม่ได้หนะครับ

รบกวนสอบถาม ผมพยายามหาวิธีคำนวณ จำนวนวัน ระหว่างวันเริ่มต้น และ วันสิ้นสุด แบบนี้ ใน chrome ตรง snippets
[code]function datediff(startDt, stopDt ) {
  const second_in_a_day =1000 * 60 * 60 * 24;
  let x = new Date(startDt);
  let y = new Date(stopDt+"T00:00:02");
  const d = y-x
  const diffDays = Math.ceil(Math.abs(d) / second_in_a_day);
  return diffDays ; 
}
const c = datediff(startDt = "12/31/2023" , stopDt = "2022-12-31");
console.log({c});
[/code]
ถ้าเปลี่ยน console.log(c) เป็น alert(c)
ก็แสดงผลออกมาได้ แต่พอเป็น console.log() มันขึ้น unidentify ในช่อง console หรือผมดูผิดทีครับ
รบกวนแนะนำทีนะครับ ขอบคุณครับ
แสดงความคิดเห็น
โปรดศึกษาและยอมรับนโยบายข้อมูลส่วนบุคคลก่อนเริ่มใช้งาน อ่านเพิ่มเติมได้ที่นี่