1. John or Michel? 1 point possible (graded) let p1 = { }; let p2 =...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. John or Michel? 1 point possible (graded) let p1 = { }; let p2 = p1; p2.name = 'John'; console.log('p1.name = + p1.name); What will be the value of p1.name? name: 'Michel', age: 52 } } John Submit 2. Don't make me older please! 1 point possible (graded) var p1 = { Michel function tryToMakeOlder (a, b) { a.age += b; name: 'Michel', age: 52 tryToMakeOlder (p1, 3); "1 console.log("New age of p1: + p1.age); } What will be the value of p1.age? } 55 Submit 52 You have used 0 of 1 attempt 4. Are we the same? 1 point possible (graded) let obj1 = { X: 2 let obj2 = { X: 2 You have used 0 of 1 attempt The expression (obj1 === obj2) will be evaluated to: true false 8. Hybrid arrays are awful, believe me! 1 point possible (graded) let days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'] days.description = 'days of the week'; 11 console.log("Description of the array:" + days.description + ", its length is equal to days.length); What will the execution of the above code display to the devtool console? It raises an error because an array is not an object Description of the array:days of the week, its length is equal to 5 Description of the array:days of the week, its length is equal to 6 Submit You have used 0 of 1 attempt 10. Give me a week-end! 1 point possible (graded) let days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; let weekEnd = days.slice (XXX, YYY); What would you put instead of XXX and YYY in the call to days.slice (XXX, YYY) in order to get the weekend days (Saturday and Sunday)? let weekEnd days.slice (days.length-2, days.length); let weekEnd days.slice (6, 7); Submit let weekEnd days.slice (5, 6); = let weekEnd days.slice (7, 8); = let weekEnd = 11. I don't want to work these days anymore! 1 point possible (graded) = You have used 0 of 1 attempt let days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; Submit What will be the content of the array days after the execution of the above code? days.splice (1, 3); days is not modified. ['Monday', 'Friday', 'Saturday', 'Sunday'] ['Thursday', 'Friday', 'Saturday', 'Sunday'] Submit ['Monday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] You have used 0 of 1 attempt 12. Two decimals only 1 point possible (graded) let x = Math.PI/2; console.log("x= + X.XXX); // expected 1.57, do not use Math. something here. What method and parameter value would you use to display the value of x with only 2 decimals? We want "x = 1.57" to be displayed in the devtool console. Type exactly what you would write instead of XXX in the code above. You have used 0 of 1 attempt Save Save Save Save Save Save 14. Change me this string! 1 point possible (graded) let s = "Hello my friends!"; Which of these will modify the string referenced by s after their execution? (2 correct answers!) s.slice(11, 16); s.substring(11, 16); S += I miss you"; s.split(' ').join('---'); S = s.slice (11, 16); 23. Strings or numbers? 1 point possible (graded) 11 let x = "10"; let y = 2; >k let z = X y; The value of z is: "20" (as a string) 20 NaN Submit You have used 0 of 1 attempt 24. Are we the same? 1 point possible (graded) In JavaScript, are classes and types the same thing? No Yes Submit You have used 0 of 1 attempt 27. Let's play with indexes! 1 point possible (graded) let a = [ 'michel', 'buffa', [5+6, 'buffa'] ]; How is this expression evaluated: (a[1] It is evaluated to true Submit It is evaluated to false You have used 0 of 1 attempt 29. Change me! 1 point possible (graded) const MY_ANIMAL = 'My cat named Fifeti! '; console.log(MY_ANIMAL); if (MY_ANIMAL) { const MY_ANIMAL = 'My white rabbit named Pinpin'; } What will be printed by the above code? === My cat named Fifeti! O My white rabbit named Pinpin a[2, 1]) ? Save Save Save 1. John or Michel? 1 point possible (graded) let p1 = { }; let p2 = p1; p2.name = 'John'; console.log('p1.name = + p1.name); What will be the value of p1.name? name: 'Michel', age: 52 } } John Submit 2. Don't make me older please! 1 point possible (graded) var p1 = { Michel function tryToMakeOlder (a, b) { a.age += b; name: 'Michel', age: 52 tryToMakeOlder (p1, 3); "1 console.log("New age of p1: + p1.age); } What will be the value of p1.age? } 55 Submit 52 You have used 0 of 1 attempt 4. Are we the same? 1 point possible (graded) let obj1 = { X: 2 let obj2 = { X: 2 You have used 0 of 1 attempt The expression (obj1 === obj2) will be evaluated to: true false 8. Hybrid arrays are awful, believe me! 1 point possible (graded) let days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'] days.description = 'days of the week'; 11 console.log("Description of the array:" + days.description + ", its length is equal to days.length); What will the execution of the above code display to the devtool console? It raises an error because an array is not an object Description of the array:days of the week, its length is equal to 5 Description of the array:days of the week, its length is equal to 6 Submit You have used 0 of 1 attempt 10. Give me a week-end! 1 point possible (graded) let days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; let weekEnd = days.slice (XXX, YYY); What would you put instead of XXX and YYY in the call to days.slice (XXX, YYY) in order to get the weekend days (Saturday and Sunday)? let weekEnd days.slice (days.length-2, days.length); let weekEnd days.slice (6, 7); Submit let weekEnd days.slice (5, 6); = let weekEnd days.slice (7, 8); = let weekEnd = 11. I don't want to work these days anymore! 1 point possible (graded) = You have used 0 of 1 attempt let days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; Submit What will be the content of the array days after the execution of the above code? days.splice (1, 3); days is not modified. ['Monday', 'Friday', 'Saturday', 'Sunday'] ['Thursday', 'Friday', 'Saturday', 'Sunday'] Submit ['Monday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] You have used 0 of 1 attempt 12. Two decimals only 1 point possible (graded) let x = Math.PI/2; console.log("x= + X.XXX); // expected 1.57, do not use Math. something here. What method and parameter value would you use to display the value of x with only 2 decimals? We want "x = 1.57" to be displayed in the devtool console. Type exactly what you would write instead of XXX in the code above. You have used 0 of 1 attempt Save Save Save Save Save Save 14. Change me this string! 1 point possible (graded) let s = "Hello my friends!"; Which of these will modify the string referenced by s after their execution? (2 correct answers!) s.slice(11, 16); s.substring(11, 16); S += I miss you"; s.split(' ').join('---'); S = s.slice (11, 16); 23. Strings or numbers? 1 point possible (graded) 11 let x = "10"; let y = 2; >k let z = X y; The value of z is: "20" (as a string) 20 NaN Submit You have used 0 of 1 attempt 24. Are we the same? 1 point possible (graded) In JavaScript, are classes and types the same thing? No Yes Submit You have used 0 of 1 attempt 27. Let's play with indexes! 1 point possible (graded) let a = [ 'michel', 'buffa', [5+6, 'buffa'] ]; How is this expression evaluated: (a[1] It is evaluated to true Submit It is evaluated to false You have used 0 of 1 attempt 29. Change me! 1 point possible (graded) const MY_ANIMAL = 'My cat named Fifeti! '; console.log(MY_ANIMAL); if (MY_ANIMAL) { const MY_ANIMAL = 'My white rabbit named Pinpin'; } What will be printed by the above code? === My cat named Fifeti! O My white rabbit named Pinpin a[2, 1]) ? Save Save Save
Expert Answer:
Answer rating: 100% (QA)
Lets take a look at each 1 p1name will be Michel Therefore the answer is b Michel 2 The new age of p... View the full answer
Related Book For
Corporate Finance A Focused Approach
ISBN: 978-1439078082
4th Edition
Authors: Michael C. Ehrhardt, Eugene F. Brigham
Posted Date:
Students also viewed these programming questions
-
a. Example 13-1: Batch Reactor with an Exothermic Reaction Wolfram 1. Adiabatic Case: Use Wolfram to see whether you can find a trajectory that is ready to ignite and whose trajectory looks like a...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
Below is the comparative income statement of Variline, Inc. Requirements 1. Prepare a horizontal analysis of the comparative income statement of Variline, Inc. Round percentage changes to the nearest...
-
Longwell Corp. announced that its profit for the current fiscal year increased by $15 million, or 20%, compared with the previous year. Further inspection of its income statement revealed that the...
-
12 is what percent of 48?
-
Refer to the information from QS 21-18. Compute the variable overhead spending variance and the variable overhead efficiency variance and classify each as favorable or unfavorable. Data From QS 21-18...
-
The following were selected from among the transactions complete by Wild Adventures Company during December of the current year. Dec. 3. Purchased merchandise on account from Miramar Co., list price...
-
A trebuchet is a mighty siege engine capable of flinging 90-kg projectiles a distance of 300 meters. Assuming a perfect launch angle of 45, calculate the speed with which one of these projectiles...
-
9. Write a program to solve function given below, with the x and y value proposed by the user. And, based on the result, show "imaginary result" response for the case of the result of the function is...
-
1 Identify the data collection methods used in each article. 1.1 Using examples from each article identify the data collection methods used in each study. Motivate each answer with examples from...
-
The range of the graph y=tan(0) is Write your answer using interval notation
-
3. Find the volume of the solid bounded above from above by the cone 2 = 4x+4y, bounded from below by the xy- plane and bounded laterally by the cylinder where a > 0. x+ y = ax.
-
Watch the TED Talk . Using your readings this week as a guide, apply what you've learned in the text by answering the following discussion questions (include references to textbook whenever...
-
We spent some time to understand what worldview is and looked at some historical and societal events that may have influenced our worldview. What is your worldview? Briefly share yours with the...
-
Find the status of the CF, PF, AF, ZF and SF after the execution of the following instructions? MOV CX, 173FH MOV AX, 8A9EH ADD AL, CH ADD CH, AL O a. 0, 1, 0, 0, 1. O b. 1, 1, 0, 0, 1. Oc 0, 1, 1,...
-
The following information is for Montreal Gloves Inc. for the year 2020: Manufacturing costs Number of gloves manufactured Beginning inventory $ 3,016,700 311,000 pairs 0 pairs Sales in 2020 were...
-
Complete the balance sheet and sales information in the table that follows for Hoffmeister Industries using the following financial data: Debt ratio: 50% Quick ratio: 0.80 Total assets turnover: 1.5...
-
What are the two principal reasons for holding cash? Can a firm estimate its target cash balance by summing the cash held to satisfy each of the two reasons?
-
Why are ratios useful? What three groups use ratio analysis and for what reasons?
-
The group \(\mathrm{D}_{3}\) in Schoenflies notation (32 in international notation, which is read "three-two"; see Table 5.1 ) consists of the proper (those not reflections or inversions) covering...
-
Derive the two-dimensional matrix representation Tic)=(2) Tin)=(3) Tex)=(37) (69) T(c2b)= 1 TO)-(71) 10-(11) TO=(9) = for the group D3, using the basis (e1, e2) defined in the following figure.
-
Prove that the matrix representation of \(\mathrm{D}_{3}\) worked out in Problem 5.6 is irreducible. Data from Problem 5.6 Derive the two-dimensional matrix representation Tic)=(2) Tin)=(3)...
Study smarter with the SolutionInn App