If totalMonths has a string value of "13", what does the code that follows display? var years = parseInt (totalMonths / 12); var months = totalMonths % 12; if (years = = 0) {alert (months + " months."); } else if (months = = 0) {alert (years + " years"); } else {alert (years + " years, and " + months + " months.");
}a) 1 years, and 1 monthsb) 1 year, and 1 monthc) 1 yearsd) 1 year
+4
Answers (1)
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “If totalMonths has a string value of "13", what does the code that follows display? var years = parseInt (totalMonths / 12); var months = ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Home » Computers & Technology » If totalMonths has a string value of "13", what does the code that follows display? var years = parseInt (totalMonths / 12); var months = totalMonths % 12; if (years = = 0) {alert (months + " months.