Saved Bookmarks
| 1. |
Sunil has written following code to store subjects in an array and display the total number of subjects in the array. His code is not running properly. Identify and underline the syntax errors in the following code and write the corrected code: function countsubs( ) { Var Subject = [“Eng” , “Math”, “Science” , “Hindi”]; Document.write (subject.length) } |
|
Answer» function countsubs( ) { var Subject = [“Eng” , “Math”, “Science” , “Hindi”]; document.write(Subject.length); } |
|