Skip to content

Commit b24b05d

Browse files
committed
WIP
1 parent 718d9df commit b24b05d

File tree

1,436 files changed

+131
-106126
lines changed

Some content is hidden

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

1,436 files changed

+131
-106126
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
console.log("Hello");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
function camelize(str) {
2+
/* your code */
3+
}

1-js/05-data-types/05-array-methods/1-camelcase/task.md renamed to 1-js/01-a/1-a1/1-camelcase/task.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
importance: 5
2+
type: js
23

34
---
45

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log("Test", "passed");

1-js/01-a/1-a1/2-runjs/source/test.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
describe("runjs", function() {
2+
3+
it("passes", function() { });
4+
it("fails", function() { throw new Error("FAIL") });
5+
6+
});

1-js/01-a/1-a1/2-runjs/task.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
importance: 5
2+
type: js
3+
4+
---
5+
6+
# Translate border-left-width to borderLeftWidth
7+
8+
Write the function `camelize(str)` that changes dash-separated words like "my-short-string" into camel-cased "myShortString".
9+
10+
That is: removes all dashes, each word after dash becomes uppercased.
11+
12+
Examples:
13+
14+
```js
15+
camelize("background-color") == 'backgroundColor';
16+
camelize("list-style-image") == 'listStyleImage';
17+
camelize("-webkit-transition") == 'WebkitTransition';
18+
```
19+
20+
P.S. Hint: use `split` to split the string into an array, transform it and `join` back.
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function camelize(str) {
2+
return str
3+
.split('-') // splits 'my-long-word' into array ['my', 'long', 'word']
4+
.map(
5+
// capitalizes first letters of all array items except the first one
6+
// converts ['my', 'long', 'word'] into ['my', 'Long', 'Word']
7+
(word, index) => index == 0 ? word : word[0].toUpperCase() + word.slice(1)
8+
)
9+
.join(''); // joins ['my', 'Long', 'Word'] into 'myLongWord'
10+
}
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
function f() {
3+
throw new Error("ERR");
4+
}
5+
6+
f();
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
describe("errorjs", function() {
2+
3+
it("passes", function() { });
4+
it("fails", function() { throw new Error("FAIL") });
5+
6+
});

1-js/01-a/1-a1/3-errorjs/task.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
importance: 5
2+
type: js
3+
4+
---
5+
6+
# Translate border-left-width to borderLeftWidth
7+
8+
Write the function `camelize(str)` that changes dash-separated words like "my-short-string" into camel-cased "myShortString".
9+
10+
That is: removes all dashes, each word after dash becomes uppercased.
11+
12+
Examples:
13+
14+
```js
15+
camelize("background-color") == 'backgroundColor';
16+
camelize("list-style-image") == 'listStyleImage';
17+
camelize("-webkit-transition") == 'WebkitTransition';
18+
```
19+
20+
P.S. Hint: use `split` to split the string into an array, transform it and `join` back.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function camelize(str) {
2+
return str
3+
.split('-') // splits 'my-long-word' into array ['my', 'long', 'word']
4+
.map(
5+
// capitalizes first letters of all array items except the first one
6+
// converts ['my', 'long', 'word'] into ['my', 'Long', 'Word']
7+
(word, index) => index == 0 ? word : word[0].toUpperCase() + word.slice(1)
8+
)
9+
.join(''); // joins ['my', 'Long', 'Word'] into 'myLongWord'
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
function f() {
2+
throw new Error("ERR");
3+
}
4+
5+
{{{
6+
7+
f();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
describe("errorjs", function() {
2+
3+
it("passes", function() { });
4+
it("fails", function() { throw new Error("FAIL") });
5+
6+
});
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
importance: 5
2+
type: js
3+
4+
---
5+
6+
# Translate border-left-width to borderLeftWidth
7+
8+
Write the function `camelize(str)` that changes dash-separated words like "my-short-string" into camel-cased "myShortString".
9+
10+
That is: removes all dashes, each word after dash becomes uppercased.
11+
12+
Examples:
13+
14+
```js
15+
camelize("background-color") == 'backgroundColor';
16+
camelize("list-style-image") == 'listStyleImage';
17+
camelize("-webkit-transition") == 'WebkitTransition';
18+
```
19+
20+
P.S. Hint: use `split` to split the string into an array, transform it and `join` back.

1-js/01-a/1-a1/article.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# An Introduction to JavaScript
2+
3+
Let's see what's so special about JavaScript, what we can achieve with it, and which other technologies play well with it.
File renamed without changes.

1-js/01-getting-started/1-intro/article.md

-120
This file was deleted.

0 commit comments

Comments
 (0)