Skip to content

Commit 1d9143f

Browse files
committed
Studio partially done
1 parent fb70a48 commit 1d9143f

File tree

6,833 files changed

+753101
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,833 files changed

+753101
-4
lines changed

arrays/studio/array-string-conversion/array-testing.js

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,20 @@ function reverseCommas() {
1010
//TODO: 1. create and instantiate your variables.
1111
let check;
1212
let output;
13+
14+
1315
//TODO: 2. write the code required for this step
16+
for (let i = 0; i < strings.length; i++) {
17+
let str = strings[i];
18+
19+
if (str.includes(',')) {
20+
let stringArray = str.split(',');
21+
stringArray.reverse();
22+
strings[i] = stringArray.join(',');
23+
}
24+
}
25+
console.log(strings);
1426

15-
//NOTE: For the code to run properly, you must return your output. this needs to be the final line of code within the function's { }.
1627
return output;
1728
}
1829

@@ -21,7 +32,9 @@ function semiDash() {
2132
let check;
2233
let output;
2334
//TODO: write the code required for this step
24-
35+
if (strings.includes(';')) {
36+
console.log(strings.split(';').sort().join('-'));
37+
}
2538

2639
return output;
2740
}
@@ -31,7 +44,9 @@ function reverseSpaces() {
3144
let check;
3245
let output;
3346
//TODO: write the code required for this step
34-
47+
if (strings.includes(' ')) {
48+
console.log(strings.split(' ').sort().reverse().join(' '));
49+
}
3550
return output;
3651
}
3752

@@ -40,7 +55,9 @@ function commaSpace() {
4055
let check;
4156
let output;
4257
//TODO: write the code required for this step
43-
58+
if (strings.includes(', ')) {
59+
console.log(strings.split(', ').reverse().join(','));
60+
}
4461
return output;
4562
}
4663

arrays/studio/array-string-conversion/node_modules/.bin/acorn

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arrays/studio/array-string-conversion/node_modules/.bin/acorn.cmd

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arrays/studio/array-string-conversion/node_modules/.bin/acorn.ps1

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arrays/studio/array-string-conversion/node_modules/.bin/browserslist

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arrays/studio/array-string-conversion/node_modules/.bin/browserslist.cmd

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arrays/studio/array-string-conversion/node_modules/.bin/browserslist.ps1

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arrays/studio/array-string-conversion/node_modules/.bin/create-jest

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arrays/studio/array-string-conversion/node_modules/.bin/create-jest.cmd

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arrays/studio/array-string-conversion/node_modules/.bin/create-jest.ps1

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arrays/studio/array-string-conversion/node_modules/.bin/escodegen

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arrays/studio/array-string-conversion/node_modules/.bin/escodegen.cmd

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arrays/studio/array-string-conversion/node_modules/.bin/escodegen.ps1

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arrays/studio/array-string-conversion/node_modules/.bin/esgenerate

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arrays/studio/array-string-conversion/node_modules/.bin/esgenerate.cmd

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arrays/studio/array-string-conversion/node_modules/.bin/esgenerate.ps1

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arrays/studio/array-string-conversion/node_modules/.bin/esparse

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arrays/studio/array-string-conversion/node_modules/.bin/esparse.cmd

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)