我收到以下错误:
"Uncaught ReferenceError: Invalid left-hand side in assignment"
从这段代码:
const cheerioReq = require("cheerio-req");
//noinspection JSAnnotator
cheerioReq("https://my.alpinegqs.com/", (err, $) = {
console:log($(".header h1").text()),
});
答案 0 :(得分:-1)
const cheerioReq = require("cheerio-req");
//noinspection JSAnnotator
cheerioReq("https://my.alpinegqs.com/", (err, $) => {
console.log($(".header h1").text()),
});
答案 1 :(得分:-1)
const cheerioReq = require("cheerio-req");
//noinspection JSAnnotator
cheerioReq("https://my.alpinegqs.com/", (err, $) => {
console:log($(".header h1").text()),
});
那应该是箭头功能吗?在(err, $) =
之后,您需要一个>