🎴 Flashcard Mode

DataStage ETL Fundamentals

Card1 / 9
Mastered0
Review0
QuestionClick to flip

var expires = new Date(); var Value1 = expires.toUTCString(); var Value2 = expires.toString(); What will Value1, and Value2 contain respectively:

AnswerClick to flip back
A
Universal Date & Time, Local Date & Time.
💡 Explanation:

The toUTCString() method converts a Date object to a string using the UTC time zone (Universal Coordinated Time), while toString() returns the local date and time based on the system's time zone settings. This distinction is important when working with time-sensitive operations across different geographical regions.

Change Mode