Home > database >  how to output console.log in url
how to output console.log in url

Time:06-12

this

fs = require('fs');
var data = fs.readFileSync('./number/data', 'utf8');
console.log(data)

i can change to this

await page.goto('https://web.whatsapp.com/send?phone=console.log(data);text=kaka');    

CodePudding user response:

Do you want to output the contents of data into the URL? If yes then use string interpolation.

await page.goto(`https://web.whatsapp.com/send?phone=${data};text=kaka`);    
  • Related