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
JulijaS [17]
3 years ago
13

Write a sequence of statements that finds the first comma in the string line, and assigns to the variable clause the portion of

line up to, but not including the comma. You may assume that an int variable pos, as well as the variables line and clause, have already been declared.
Computers and Technology
1 answer:
densk [106]3 years ago
6 0

Answer:

I will code in Javascript;

function findFirstComma() {

var pos;

var line = 'Thi,s is a t,est';

var clause;

pos = line.indexOf(','); <em>//set pos in 3.</em>

clause= line.slice(0,pos);  <em>// saves in clause the value 'Thi'.</em>

}

Explanation:

The slice(start, end) method extract a part of a string then returns a new string with the extracted part.  The end parameter indicates where to end the extraction(up to, but not including).

The includes(value) method determines if a string contains the characters on a specified string, if it doesn't match then returns -1.

You might be interested in
How will computing change our world?
Eduardwww [97]
Well, currently in our revolving world, computers are mostly used which led to laziness for some people. However the school systems in most countries still depend on manual computing which can be really essential to the current generation. Computing can really change our current world, it helps us to not depend on computers, gives people more job opportunities. Helps to strengthen brain power which can contribute to large variety of factors. A smarter generation, and if possible, a more advance society.
7 0
3 years ago
How many mb are in a gb?
frosja888 [35]

Answer:

1000 megabytes are in a gigabyte

Explanation:

3 0
3 years ago
KAILANGAN ANG MASIDHI AT MALAWAKANG PAGBABASA NA SIYANG MAKAPAGBUBUKAS NG DAAN SA LAHAT NG KARUNUNGAN AT DISIPLINA TULAD NG AGHA
Goryan [66]

Answer:

Oo, tama ka!

Brainiliest?

7 0
3 years ago
Which of the following is not a language commonly used for web programming?
DerKrebs [107]
The answer would be Assembly language as assembly language is not used for web development, but rather is a low level programming language.

Please mark branliest if this helped!!
7 0
3 years ago
Read 2 more answers
For each of the following scenarios, write down what feature should be used in
inessss [21]

Answer:

d

Explanation:

5 0
3 years ago
Other questions:
  • By default, table headers will include the arrows shown in the table. What menu option(s) are available when this arrow is click
    8·2 answers
  • What allows windows to quickly be resized by clicking the title bar of the window and dragging it to the top, sides, or middle o
    9·1 answer
  • In our networked world, we have more opportunities to stereotype, which is problematic because:
    7·2 answers
  • 14.18 Lab 5d - Nested Looping Write a program that:
    10·1 answer
  • g Write a recursive function all capital (L,start ,stop) that takes a string L and two integers. It returns a Boolean (True/Fals
    8·1 answer
  • A total stranger is trolling Jack online. He’s offended and annoyed. How can Jack stop the troll in his or her tracks? (5 points
    10·2 answers
  • All the network nodes are connected to each other
    8·1 answer
  • In what ways can you sort data by using the sort procedure? Check all that apply.
    6·1 answer
  • After you have located a program name from the Start menu, in order to create a shortcut on the desktop.
    8·1 answer
  • A(n) _____ is a data validation rule that should be applied to mandatory data items.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!