按照您的标准,我是新手,请耐心等待
我到处都尝试了一些小的更改,但是总是像if语句不能正确检查条件。
var WordPOS = require('wordpos'),
wordpos = new WordPOS(),
truth = new Boolean();
wordpos.isNoun('tree') // Test if the word "TREE" is a noun
.then(console.log) //Outputs a true/false statement (TRUE in this case)
.then(truth) // Write TRUE to the variable
if (truth === true) {
console.log('yes')
}else{
console.log('no')
}
// Output looks like this:
// no
// true