Maximize your child’s potential! Call 410-544-6696 Follow us
Just a few multiple choice questions. You can only select 1 answer.
let name = "Mary";
function sayHello(name) {
console.log("Hello ", name);
name = "Steven"; }
sayHello()s;What do you think will be logged in console?
Review the code snippet below. Then indicate in the following section what value you think will be stored in the variable returned Value.
function sumsWithTen(num) { console.log(num); let sum = num + 10; return 'the sum is ' + sum;}let returnedValue = sumsWithTen(20);
The function should take as many as three names (first, middle,and last). "myInitials" should return a string with only the first letters from each name, in upper case.Note that, if the user doesn't define middle name, the function should return the initials of the first and last names only.
Example:
let steveInitials = myInitials('steven', 'william', 'hawking')console.log(steveInitials); // SWH
let graceInitials = myInitials('grace', 'hopper');console.log(graceInitials); // GH
Select one of the four solutions below that best implement myInitials
Solution 1
function myInitials (first, middle, last) {
Review the visual puzzle above and enter your guess for the value of '?' below.