alert
which was introdduced
alert('the big one')
also (think why the difference between method alert and prompt, so this )
console.log(alert('the big one'))
// think why the difference between method alert and prompt, so this little try
// but it runs, no mistake
prompt
introduced
let number = prompt('Enter number', 'number goes here')
console.log(number)
same changes
let number = prompt('Enter number', )
console.log(number);
//it runs
let number = prompt('Enter number', '')
console.log(number);
//it runs;
let number = prompt('Enter number')
console.log(number);
//it runs;
const agree = confirm('Are you sure you like to delete? ')
console.log(agree) // result will be true or false based on what you click on the dialog box
const now = new Date()
console.log(now) // Sat Jan 04 2020 00:56:41 GMT+0200 (Eastern European Standard Time)
console.log(now.getFullYear()) // 2020
const allSeconds = Date.now() //
console.log(allSeconds) // 1578092201341, this is the number of seconds passed from January 1, 1970 to January 4, 2020 00:56:41
const timeInSeconds = new Date().getTime()
console.log(allSeconds == timeInSeconds) // true
template string
console.log(`The sum of 2 and 3 is 5`) // statically writing the data
let a = 2
let b = 3
console.log(`The sum of ${a} and ${b} is ${a + b}`) // injecting the data dynamically
//what is a problem is the symbol ```` , cannot be ''''
//either would be a string when runs