10
การคืนค่าʻundefined` หรือ `null` จากฟังก์ชัน javascript จะดีกว่าไหม
ฉันมีฟังก์ชั่นที่ฉันเขียนซึ่งโดยทั่วไปมีลักษณะดังนี้: function getNextCard(searchTerms) { // Setup Some Variables // Do a bunch of logic to pick the next card based on termed passed through what I'll call here as 'searchTerms' all of this logic is omitted because it's not important for my question. // ... // If we find a …