function two_strings_have_same_number_of_words(str1, str2) {
const wordsOfStr1 = str1.split(" ");
const wordsOfStr2 = str2.split(" ");
return wordsOfStr1.length === wordsOfStr2.length;
}
const str1 = "node.js java c++ go";
const str2 = "c python c# assembler";
if (two_strings_have_same_number_of_words(str1, str2)) {
console.log("yes");
} else {
console.log("no");
}
/*
run:
yes
*/