I am using Cheerio to parse the html and then running the following:
+$("#price1").text()|| +$("#price2").text() || undefined
Basically it tries to get the prices if the first fails and finally returns undefined if all fails.
How can I do the same thing in Puppeteer? I am not sure how to use page.evaluate to execute this chain of if-else commands. (I am also using Typescript as well.)