Exam (elaborations) Assessment Material 321098
As before, this review is not a “practice test”— it is longer than the exam will be and covers more material. Some of the questions may be harder and/or more timeconsuming than the exam questions. Furthermore, this review is not exhaustive and there may be questions on the test that are not exhibited here. These questions are here for you to think about and to trigger your own thoughtful inquiry into the material. Review the lecture notes and textbook reading in an inquisitive way: not only “do I understand this,” but “can I explain it,” and “can I use it” and even “what bits of syntax are tricky here?” In addition to answering these questions, we recommend studying your midterm exam and homework problems, working through past problems and seeking assistance to understand solutions you did not understand the first time around. Finally, the final exam is cumulative, so don’t forget to review old material, even HTML! Q1: Fill in the following sentences: A. Each line of JavaScript code is called a ______________. B. You can concatenate __________ together with the + operator. C. All JavaScript statements end with a _______________. D. To link to an external JavaScript file from HTML, you need the _______ attribute for the scriptelement. E. OR(||)and AND(&&)are ______________ operators. F. A parameter acts like a _____________ in the body of a function. Q2: Why do we need variables in a JavaScript program? Explain how they are used throughout a program. Q3: What does it mean in JavaScript when something is displayed as “undefined” in the console? Q4: Is a relational operator, such as =, used in the same kind of expressions as a logical operator, such as &&? Explain Q5:Answer the following questions without using the console. You can use the console to check your value only after you have tried to complete the questions by hand. Show your work. vartemp=81; varwillRain=true; varhumid=(temp80&&willRain==true); A. What is the value of humid? _____________ varguess=6; varisValid=(guess=0&&guess=6); B. What is the value of isValid? _____________ varkB=1287; vartooBig=(kB1000); varurgent=true; varsendFile=(urgent==true||tooBig==false); C. What is the value of sendFile? _____________ Q6. Find all the bugs in this JavaScript code: //Testforjokes varjoke="JavaScriptwalkedintoabar...'; vartoldJoke="false"; var$punchline= "Betterwatchoutforthosesemi-colons." var%entage=20; varresult if(toldJoke==true){ Alert($punchline); }else alert(joke); } Q7: Declare a variable that will store an array of string values. Explain every component of the
Written for
- Institution
- Assessment Material 321098
- Course
- Assessment Material 321098
Document information
- Uploaded on
- July 8, 2024
- Number of pages
- 9
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
cs110 review questions for final exam