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
adoni [48]
3 years ago
6

write a script to check command arguments. Display the argument one by one (use a for loop). If there is no argument provided, r

emind users about the mistake.
Computers and Technology
1 answer:
algol133 years ago
4 0

Answer and Explanation:

Using Javascript programming language, to write this script we define a function that checks for empty variables with if...else statements and then uses a for loop to loop through all arguments passed to the function's parameters and print them out to the console.

function Check_Arguments(a,b,c){

var ourArguments= [];

if(a){

ourArguments.push(a);}

else( console.log("no argument for a"); )

if(b){

ourArguments.push(b);}

else( console.log("no argument for b"); )

if(c){

ourArguments.push(c);}

else( console.log("no argument for c"); )

for(var i=0; i<ourArguments.length; i++){

Console.log(ourArguments[i]);

}

}

You might be interested in
Which of the following is an approach to debugging?
lora16 [44]
D) code restructuring
6 0
3 years ago
Read 2 more answers
In a contract, what is consideration
Mrac [35]
Do you wan the definition ?
3 0
3 years ago
Why is it unlikely that you will find the ip address 192.168.250.10 on the internet?
gayaneshka [121]
That IP address is either Internal, private or reserved
5 0
4 years ago
Which of the following is an example of plagiarism? A. Listing someone as an author who did not actually contribute to the publi
Nata [24]

Answer:

C. <em>Presenting someone else’s ideas or words and claiming them as one's own.</em>

Explanation:

The correct option is <em>C. Presenting someone else’s ideas or words and claiming them as one's own. </em>

The definition of <em>Plagiarism </em>indicates that stealing and passing off ideas or words created and / or developed by others and pretending or signifying that such words or ideas are one´s one is considering an act of plagiarism.

3 0
3 years ago
How can you use the cash envelop system and the 50-30-20 rule at the same time
Amanda [17]

Answer:

hi

Explanation:

6 0
3 years ago
Other questions:
  • Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, a
    13·2 answers
  • Hailey is preparing a questionnaire on the different number systems. He asks the students to write down the correct decimal and
    10·2 answers
  • What is the benefit to having the user interface integrated into the operating system? a) Power users prefer the added flexibili
    13·1 answer
  • The information gathering technique that enables the analyst to collect facts and opinions from a wide range of geographically d
    11·1 answer
  • The picture that graphically represents the items you use in windows is called a/an
    15·2 answers
  • Caitlyn's Crafty Creations computes a retail price for each product as the cost of materials plus $14 multiplied by the number o
    10·1 answer
  • The geographic coordinate system is used to represent any location on Earth as a combination of latitude and longitude values. T
    5·1 answer
  • Yooooooooooooooo
    5·2 answers
  • Lesson 12: while loops with the farmer. Number 9.
    10·2 answers
  • What is the grooming process as it relates to online predators
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!