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
-
Bonus Question #2 (14 marks) A Live cattle contract (40,000 lbs) due in 12 months is 70 cents/lb and a Feeder contract (50,000 lbs) due in 6 months is 90 cents/ lb. If you expect the incentive to...
-
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...
-
What is the wavelength of the radio waves transmitted by an FM station at 90 MHz? (Radio waves travel at 3.0 ( 10 8 m/s.)
-
The future of aviation: How does drone technology impact environmental management and/or drone use in disaster management? What agencies use drones and in what capacity? Include hyperlink of some...
-
Although much of the work of an equity analyst involves quantitative analysis, some analysts also engage in various qualitative analyses to help them assess the persistence of a firms current...
-
Preparing the income statement and balance sheet using the accrual basis Bob Hansen opens a retail store on January 1, 2008. Hansen invests $50,000 for all of the common stock of the firm. The store...
-
P 8-1 Arrow Construction Company Ltd. purchased a farm from K. Jones. Arrow and Jones completed the transaction under the following terms: a check from Arrow to Jones for $140,000; bank loan assumed...
-
If carbon dioxide is present in the atmosphere, then plants have a source of carbon. Hence, since plants have a source of carbon, carbon dioxide is present in the atmosphere. Use the counterexample...
-
Question 3: The Daily Crumb is a bakery in Auckland. On July 31 they entered a contract with Proud Mills for the supply of flour. By the said contract, Proud Mills are required to supply 20 bags of...
-
What is the major advantage of snowball sampling?
-
What are the advantages and disadvantages of judgmental sampling?
-
What is the major difference between a sample and a census?
-
What conferences are coming up that could provide value to BCM?
-
Why are grooming and attire so important in selling? How do you know if you are dressed appropriately for a customer?
-
3. A surfer is about to attempt to ride the biggest wave she has ever seen. Her heart is pounding with fear, and she is not sure if she can make it without wiping out, but she attempts to ride the...
-
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?
-
Jason Edson and Peggy Karam agreed to liquidate their partnership on April 30 of the current year. On that date, after financial statements were prepared and closing entries were posted, the general...
-
Scott Badger and Maxine Giesen are partners in a business. On December 31 of the current year, the partners equities are Scott, \($60,000.00\) and Maxine, \($90,000.00.\) The net income for the year...
-
Jeffrey Lowe and Mona Ray are partners in a business. Statement paper, page 12 of a general journal, and a portion of the partnership's completed work sheet for the year ended December 31 of the...
Study smarter with the SolutionInn App