Seeking to deepen my comprehension of promises. In this code snippet, I am working on creating two promises that will return the numbers 19 and 23 respectively. However, when attempting to console log the value returned from the first promise, I encounter an error stating 'promise1.then is not a function.' How can I access the eventual value returned from promise1? Many thanks.
const promise1 = () => new Promise((resolve, reject) => {
console.log('inside promise1');
setTimeout(resolve, 1000, 19);
});
const promise2 = () => new Promise((resolve, reject) => {
setTimeout(resolve, 3000, 23);
});
promise1.then(d => console.log(d));