1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vanyuwa [196]
3 years ago
12

Consider the following JavaScript code fragment:var greeting = function ( name ) {console.log ( name )}The best answer for what

is wrong with this code is:Group of answer choices
Computers and Technology
1 answer:
julia-pushkina [17]3 years ago
3 0

Answer:

name is a reserved word in JS and cannot be used as an identifier

Explanation:

From the group of answer choices provided the only one that may be a problem would be using the word name as a parameter. Although name is not a reserved word per say in JS it is in HTML, and since JS targets HTML it could cause some errors. This however does not prevent this code from running correctly. JS does not require semicolons anymore, and the opening and closing braces for a body of code does not need to be on their own lines. Also, variable names are not Strings and do not need to be inside quotes, even for console.log()

You might be interested in
Write a C++ program using a do while loop for (Find the highest score). The program should work for any number of students. Run
alexdok [17]

Answer:

  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.    int highest = 0;
  6.    int score;  
  7.    do{
  8.        cout<<"Input a score: ";
  9.        cin>>score;
  10.        
  11.        if(score > highest){
  12.            highest = score;
  13.        }    
  14.    }while(score >= 0);
  15.    
  16.    cout<<highest;
  17.    return 0;
  18. }

Explanation:

Firstly, create a variable highest and initialize it with zero (Line 5). Next, create a do while loop (Line 7 - 14). Within the loop prompt user to input a score (Line 8-9) and if the current score is higher than the highest variable, assign the score to highest variable (Line 11 - 13).

After finishing the loop when user put in any negative value, the program shall be able to print out the highest input score (Line 16).

8 0
3 years ago
URGENT!!! If Pete selects the green square or little green camera icon on his camera dial, what mode is he selecting?
SOVA2 [1]

B Shutter Priority Mode

7 0
3 years ago
What is the Rocker-Bogie System?
Dovator [93]

Answer:

The Rocker-Bogie System is the suspension arrangement developed in 1988 for use in NASA's Mars Rover Sojourner and which has become NASA's favored design for rovers.

Hope that this helps!

4 0
3 years ago
What is a half note + a 8th note in band? plz helppp
skad [1K]
One quarter note plus one eighth note equals one and a half beats. So a dotted quarter note lasts for one and a half beats.
3 0
4 years ago
Read 2 more answers
With which game is the Taito Corporation associated?
gregori [183]
It is a japanese video game publisher known for publishing space invaders

4 0
3 years ago
Other questions:
  • Computer models are the only type of model that can be used to make predictions. Please select the best answer from the choices
    10·2 answers
  • Define scanning and why it’s considered one of the most important phases of intelligence gathering for an attacker. Also discuss
    10·1 answer
  • Which of the following protocols is used to unsure secure transmissions on port 443?A. HTTPSB. TelnetC. SFTPD. SHTTP
    6·1 answer
  • WILL GIVE BRAINLIEST!!!
    15·2 answers
  • Read this excerpt from The Outsiders. Or I could have gotten one of the gang to come along, one of the four boys Darry and Soda
    10·2 answers
  • Is a free verse a poetry that has no images
    5·2 answers
  • 3.<br>What is the meaning of *.VBP.<br>​
    6·2 answers
  • Need help with these plss correct answers
    13·1 answer
  • How does the internet works
    14·1 answer
  • Iris has completed a graphic design project for a client. what should iris obtain from the client in order to display the work i
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!