Merge branch 'master' of https://github.com/iliakan/javascript-tutorial-en
This commit is contained in:
commit
a8455f95b6
4 changed files with 4 additions and 6 deletions
|
@ -10,7 +10,7 @@ Let's try 5 array operations.
|
|||
2. Append "Rock-n-Roll" to the end.
|
||||
3. Replace the value in the middle by "Classics". Your code for finding the middle value should work for any arrays with odd length.
|
||||
4. Strip off the first value of the array and show it.
|
||||
5. Prepend `Rap` and `Reggie` to the array.
|
||||
5. Prepend `Rap` and `Reggae` to the array.
|
||||
|
||||
The array in the process:
|
||||
|
||||
|
@ -19,6 +19,6 @@ Jazz, Blues
|
|||
Jazz, Bues, Rock-n-Roll
|
||||
Jazz, Classics, Rock-n-Roll
|
||||
Classics, Rock-n-Roll
|
||||
Rap, Reggie, Classics, Rock-n-Roll
|
||||
Rap, Reggae, Classics, Rock-n-Roll
|
||||
```
|
||||
|
||||
|
|
|
@ -472,7 +472,7 @@ alert( str.split('') ); // t,e,s,t
|
|||
```
|
||||
````
|
||||
|
||||
The call [arr.join(str)](mdn:js/Array/join) does the reverse to `split`. It creates a string of `arr` items glued by `str` beween them.
|
||||
The call [arr.join(str)](mdn:js/Array/join) does the reverse to `split`. It creates a string of `arr` items glued by `str` between them.
|
||||
|
||||
For instance:
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
In object-oriented programming, a *class* is an extensible program-code-template for creating objects, providing initial values for state (member variables) and implementations of behavior (member functions or methods).
|
||||
```
|
||||
|
||||
There's a special syntax construct and a keyword `class` in JavaScript. But before studying it, we should consider that the term "class" comes the theory of object-oriented programming. The definition is cited above, and it's language-independant.
|
||||
There's a special syntax construct and a keyword `class` in JavaScript. But before studying it, we should consider that the term "class" comes from the theory of object-oriented programming. The definition is cited above, and it's language-independant.
|
||||
|
||||
In JavaScript there are several well-known programming patterns to make classes even without using the `class` keyword. And here we'll talk about them first.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue