Skip to content

Latest commit

 

History

History
executable file
·
18 lines (14 loc) · 778 Bytes

File metadata and controls

executable file
·
18 lines (14 loc) · 778 Bytes

Consider the following code segment:

function alterNumber(number){
  return number * number + 2;
}
console.log(alterNumber(20));

What will the following code segment print to the console?<<

(x) 402 {{Correct because the function alterNumber() squares the input and adds 2 to the squared value.}} ( ) 20 {{Incorrect because the function alterNumber() changes the value 20 to 402.}} ( ) 400 {{Incorrect because the function alterNumber() adds 2 to the squared value.}} ( ) 440 {{Incorrect because the function alterNumber() squares the input and adds 2 to the squared value.}} ( ) 484 {{Incorrect because the function alterNumber() squares the input and adds 2 to the squared value.}}

||The function above changes the input by squaring it and adding two.||