fix(guide): simplify directory structure

This commit is contained in:
Mrugesh Mohapatra
2018-10-16 21:26:13 +05:30
parent f989c28c52
commit da0df12ab7
35752 changed files with 0 additions and 317652 deletions

View File

@ -0,0 +1,14 @@
---
title: String
---
## String
In JavaScript the `String` global object is a constructor for strings, which store series of characters. Strings can be created in the form of literals, such as `var greeting = "Hi, campers!";` or using the `String` constructor: `var greeting = new String("Hi, campers!");`.
Unlike some other languages, JavaScript doesn't care if you use single `' '` or double `" "` quotes for strings. You can even use them *inside* the strings, they just have to be different from the quotes that embrace the string `"Isn't that awesome?"`.
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->
[MDN web docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
[w3schools.com](https://www.w3schools.com/jsref/jsref_obj_string.asp)

View File

@ -0,0 +1,31 @@
---
title: String fromCharCode
---
The static `String.fromCharCode()` method returns a string created by using the specified sequence of Unicode values.
## Syntax
String.fromCharCode(num1[, ...[, numN]])
### Parameters
**num1, ..., numN**
A sequence of numbers that are Unicode values.
<a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode' target='_blank' rel='nofollow'>MDN link</a> | <a href='https://msdn.microsoft.com/en-us/LIBRary/wb4w0k66%28v=vs.94%29.aspx' target='_blank' rel='nofollow'>MSDN link</a>
## Description
This method returns a string and not a String object.
Because `fromCharCode()` is a static method of String, you always use it as `String.fromCharCode()`, rather than as a method of a String object you created.
## Examples
String.fromCharCode(65, 66, 67); // "ABC"
var test = String.fromCharCode(112, 108, 97, 105, 110);
document.write(test);
// Output: plain

View File

@ -0,0 +1,15 @@
---
title: String Fromcodepoint
---
## String Fromcodepoint
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-fromcodepoint/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,45 @@
---
title: String Length
---
The `length` property represents the length of a string.
## Syntax
str.length
<a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length' target='_blank' rel='nofollow'>MDN link</a> | <a href='https://msdn.microsoft.com/en-us/LIBRary/3d616214%28v=vs.94%29.aspx' target='_blank' rel='nofollow'>MSDN link</a>
## Description
This property returns the number of code units in the string. UTF-16, the string format used by JavaScript, uses a single 16-bit code unit to represent the most common characters, but needs to use two code units for less commonly-used characters, so it's possible for the value returned by length to not match the actual number of characters in the string.
For an empty string, length is 0.
The static property `String.length` returns the value 1.
## Examples
var x = 'Mozilla';
var empty = '';
console.log('Mozilla is ' + x.length + ' code units long');
/* "Mozilla is 7 code units long" */
console.log('The empty string has a length of ' + empty.length);
/* "The empty string has a length of 0" */
var str = "every good boy does fine";
var start = 0;
var end = str.length - 1;
var tmp = "";
var arr = new Array(end);
while (end >= 0) {
arr[start++] = str.charAt(end--);
}
// Join the elements of the array with a
var str2 = arr.join('');
document.write(str2);
// Output: enif seod yob doog yreve

View File

@ -0,0 +1,36 @@
---
title: String.prototype.charAt
---
The `charAt()` method returns the specified character from a string.
## Syntax
str.charAt(index)
## Parameters
**index**
An integer between 0 and 1-less-than the length of the string.
<a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charAt' target='_blank' rel='nofollow'>MDN link</a> | <a href='https://msdn.microsoft.com/en-us/LIBRary/65zt5h10%28v=vs.94%29.aspx' target='_blank' rel='nofollow'>MSDN link</a>
## Description
Characters in a string are indexed from left to right. The index of the first character is 0, and the index of the last character in a string called `stringName` is `stringName.length - 1`. If the index you supply is out of range, JavaScript returns an empty string.
## Examples
var anyString = 'Brave new world';
console.log("The character at index 0 is '" + anyString.charAt(0) + "'"); // 'B'
console.log("The character at index 1 is '" + anyString.charAt(1) + "'"); // 'r'
console.log("The character at index 2 is '" + anyString.charAt(2) + "'"); // 'a'
console.log("The character at index 3 is '" + anyString.charAt(3) + "'"); // 'v'
console.log("The character at index 4 is '" + anyString.charAt(4) + "'"); // 'e'
console.log("The character at index 999 is '" + anyString.charAt(999) + "'"); // ''
var str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
document.write(str.charAt(str.length - 1));
// Output: Z

View File

@ -0,0 +1,31 @@
---
title: String.prototype.charCodeAt
---
The `charCodeAt()` method returns the numeric Unicode value of the character at the given index (except for unicode codepoints > 0x10000).
## Syntax
str.charCodeAt(index)
### Parameters
**index**
An integer greater than or equal to 0 and less than the length of the string; if it is not a number, it defaults to 0.
<a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt' target='_blank' rel='nofollow'>MDN link</a> | <a href='https://msdn.microsoft.com/en-us/LIBRary/hza4d04f%28v=vs.94%29.aspx' target='_blank' rel='nofollow'>MSDN link</a>
## Description
Note that `charCodeAt()` will always return a value that is less than 65536\. This is because the higher code points are represented by a pair of (lower valued) "surrogate" pseudo-characters which are used to comprise the real character. Because of this, in order to examine or reproduce the full character for individual characters of value 65536 and above, for such characters, it is necessary to retrieve not only `charCodeAt(i)`, but also `charCodeAt(i+1)` (as if examining/reproducing a string with two letters). See example 2 and 3 below.
`charCodeAt()` returns `NaN` if the given `index` is less than 0 or is equal to or greater than the length of the string.
## Examples
'ABC'.charCodeAt(0); // returns 65
var str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
document.write(str.charCodeAt(str.length - 1));
// Output: 90

View File

@ -0,0 +1,15 @@
---
title: String.prototype.codePointAt
---
## String.prototype.codePointAt
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-codepointat/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,33 @@
---
title: String.prototype.concat
---
The concat() method combines the text of two or more strings and returns a new string.
**Syntax**
str.concat(string2[,..., stringN]);
## Parameters
**string2...string_N_** The strings which are to be concatenated to this String.
<a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat' target='_blank' rel='nofollow'>MDN Link</a>
## Description
The concat() method combines the text of two or more strings and returns the concatenated string. It does not modify the original strings.
## Examples
**Concatenating strings**
```JavaScript
var str1 = "Hello";
var str2 = "World";
console.log(str1.concat(str2));
// Console will output: HelloWorld
var str2 = "Hello, ";
console.log(str2.concat(" Welcome ", "to FCC."));
// Console will output: Hello, Welcome to FCC.
```
Source [MDN]</a>

View File

@ -0,0 +1,21 @@
---
title: String.prototype.endsWith
---
## String.prototype.endsWith
The `endsWith()` method checks if the string ends with your string input and returns a boolean value.
### For example
```js
let str = "Hello world";
let bool = str.endsWith("ld") // true
bool = str.endsWith("llo") // false
```
This method can also accept another parameter, the `length` that determines before what character to search the string.
```js
let str = "Hello world";
let bool = str.endsWith("ld", 5) // false, it's the same as "Hello".endsWith("ld")
bool = str.endsWith("llo", 5) // true, it's the same as "Hello".endsWith("llo")
```

View File

@ -0,0 +1,61 @@
---
title: String.prototype.includes
---
## String.prototype.includes
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-includes/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
The `includes()` method is used to determine whether or not one string can be found in another string. This method returns a boolean value (either `true` or `false`).
Important to note is that this method is case-sensitive.
**Syntax**
```js
string.includes(searchString[, position])
```
**Parameters**
This method requires only one parameter (searchString). However, by including a second parameter (position), you can start your search for a string within a string from a specific position (or index) in the searchString.
**Examples**
```js
let string = "Roses are red, violets are blue.";
string.includes('red'); // returns true
```
```javascript
let string = "Roses are red, violets are blue.";
string.includes('Red'); // returns false
```
```javascript
let string = "Roses are red, violets are blue.";
string.includes('red',12); // returns false because 'red' starts at position 9, and our search begins at position 12.
```
```javascript
let string = "Roses are red, violets are blue.";
string.includes('blue',12); // returns true because 'blue' starts after our search begins at position 12.
```
```javascript
let string = "Roses are red, violets are blue.";
string.includes('violets are blue'); // returns true
```
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes">MDN</a>

View File

@ -0,0 +1,36 @@
---
title: String.prototype.indexOf
---
## String.prototype.indexOf
The `indexOf()` method returns the first index at which a given element can be found in the array. If the element is not present, it returns -1.
**Syntax**
```javascript
str.indexOf(searchValue[, fromIndex])
```
### Parameters
* **searchValue** Substring for which you are looking. If this is empty (`''`) and there is no `fromIndex` parameter, this will return 0.
* **fromIndex** Optional. The index at which you want to start the search. If the `fromIndex` value is greater than or equal to the string's length, the string is not searched and the method returns -1. If the `searchValue` is an empty string (`''`) and the `fromIndex` is less than the string's length, it will return the `fromIndex`; otherwise, it will return the string's length. (A negative number will be treated as though there is no argument.)
### Description
The `indexOf()` method checks the string from left to right. The index of the first character is 0; the index of the last character is ``string.length - 1``. The method checks each substring against `searchValue` using strict equality (`===`), which means this method is case sensitive. Once it finds a substring that returns `true`, it returns the index of its first character.
### Examples
```javascript
'Blue Whale'.indexOf('Blue'); // returns 0
'Blue Whale'.indexOf('Blute'); // returns -1
'Blue Whale'.indexOf('Whale', 0); // returns 5
'Blue Whale'.indexOf('Whale', 5); // returns 5
'Blue Whale'.indexOf('Whale', 7); // returns -1
'Blue Whale'.indexOf(''); // returns 0
'Blue Whale'.indexOf('', 9); // returns 9
'Blue Whale'.indexOf('', 10); // returns 10
'Blue Whale'.indexOf('', 11); // returns 10
'Blue Whale'.indexOf('blue'); // returns -1
```
### More Information:
- MDN documentation: <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf' target='_blank' rel='nofollow'>MDN</a>
- MSDN documentation: <a href='https://docs.microsoft.com/en-us/scripting/javascript/reference/indexof-method-string-javascript' target='_blank' rel='nofollow'>MSDN</a>

View File

@ -0,0 +1,15 @@
---
title: String.prototype.lastIndexOf
---
## String.prototype.lastIndexOf
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-lastindexof/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,15 @@
---
title: String.prototype.localecompare
---
## String.prototype.localecompare
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-localecompare/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,15 @@
---
title: String.prototype.match
---
## String.prototype.match
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-match/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,15 @@
---
title: String.prototype.normalize
---
## String.prototype.normalize
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-normalize/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,15 @@
---
title: String.prototype.padEnd
---
## String.prototype.padEnd
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-padend/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,15 @@
---
title: String.prototype.padStart
---
## String.prototype.padStart
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-padstart/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,20 @@
---
title: String.prototype.repeat
---
## String.prototype.repeat
The `.repeat(n)` method gets an integer paramenter and returns the string repeated `n` times.
### For example
```js
let str = "test";
console.log(str.repeat(3)); // "testtesttest", test is repeated 3 times
// NB
console.log(str.repeat(2.5)); // "testtest", 2.5 is converted to an integer and test is repeated 2 times
```
#### More Information
[MDN - String.prototype.repeat()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat)

View File

@ -0,0 +1,15 @@
---
title: String.prototype.replace
---
## String.prototype.replace
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-replace/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,15 @@
---
title: String.prototype.search
---
## String.prototype.search
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-search/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,42 @@
---
title: String.prototype.slice
---
The JavaScript string method `.slice()` extracts a portion of a string and returns a new string.
## Syntax
str.slice(beginSliceIndex [, endSliceIndex]);
## Parameters
**beginSliceIndex**
The zero-based index where the slice should begin. If beginSliceIndex is a negative number, `.slice()` counts backwards from the end of the string to determine where to begin the slice.
**endSliceIndex**
Optional. The zero-based index where the slice should end. If omitted, `.slice()` extracts to the end of the string.
<a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice' target='_blank' rel='nofollow'>MDN Link</a>
## Description
`.slice()` slices the text out of one string and returns a new string.
## Examples
**Using `.slice()` to create a new string**
var string1 = "Hello World!";
var string2 = string1.slice(3);
console.log(string2); // Will log "lo World!"
var string3 = string1.slice(3, 7);
console.log(string3); // Will log "lo W"
**Using `.slice()` with negative indices**
var string = "Hello World!"
str.slice(-3); // Returns "ld!"
str.slice(-3, -1); // Returns "ld"
str.slice(0, -1); // Returns "Hello World"

View File

@ -0,0 +1,39 @@
---
title: String.prototype.split
---
## String.prototype.split
The `split()` function separates an original string into substrings, based on a _separator string_ that you pass as input.
The output of the `split()` function is an `Array` of strings, which represent the separated substrings from the original string.
The original string is not altered by the `split()` function.
Examples:
```js
// We have a regular string
"Hello. I am a string. You can separate me."
// Let's use the split function to separate the string by the period character:
"Hello. I am a string. You can separate me.".split(".");
// output is [ "Hello", " I am a string", " You can separate me", "" ]
```
Since we used the period (`.`) as the _separator string_, the strings in the output array do not contain the period in them; the output separated strings _do not include the input separator string itself_.
The _string separator_ does not have to be a single character, it can be any other string:
```js
"Hello... I am another string... keep on learning!".split("...");
// output is [ "Hello", " I am another string", " keep on learning!" ]
const names = "Kratos- Atreus- Freya- Hela- Thor- Odin";
// notice separator is a dash and a space
names.split("- ");
// output is [ "Kratos", "Atreus", "Freya", "Hela", "Thor", "Odin" ]
```
#### More Information:
- [String.prototype.split on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)

View File

@ -0,0 +1,15 @@
---
title: String.prototype.startsWith
---
## String.prototype.startsWith
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-startswith/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,33 @@
---
title: String.prototype.substr
---
## String.prototype.substr
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
The substr() method extracts parts of a string, beginning at the character at the specified position, and returns the specified number of characters.
#### Syntax
```JavaScript
string.substr(start, length);
```
#### Parameter Values
| Parameter | Description |
| :-------------| :-------------|
| start | **Required.** The position where to start the extraction. First character is at index 0.<br>If *start* is positive and greater than, or equal, to the length of the string, substr() returns an empty string.<br>If *start* is negative, substr() uses it as a character index from the end of the string.<br>If *start* is negative or larger than the length of the string, start is set to 0|
| length | **Optional**. The number of characters to extract. If omitted, it extracts the rest of the string|
#### Examples:
```JavaScript
let str = "Hello world!";
let res = str.substr(1, 4);
```
The result of res will be:
```
ello
```
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->
<a href='https://www.w3schools.com/jsref/jsref_substr.asp'>JavaScript String substr() Method</a>.

View File

@ -0,0 +1,30 @@
---
title: String.prototype.substring
---
## String.prototype.substring
The `substring()` function _extracts_ a sequence of characters from another given string. It does not alter the original string.
You define the sequence to extract with a _start and end character index_. These indexes are passed into the `substring()` function as parameters. The substring is formed from the character of the start index all the way to the character of the end index. Both indexes are counted from the beginning of the string, starting from `0`.
Examples:
```js
"Hello, campers".substring(7, 14);
// output is "campers"
"Hello, world".substring(0, 5);
// output is "Hello"
```
You can also omit the last character index parameter, and the substring sequence will extract from the start index until the end of the string. Example:
```js
"Hello, campers!".substring(7);
// output is "campers!"
```
#### More Information:
- [String.prototype.substring() on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring)

View File

@ -0,0 +1,15 @@
---
title: String.prototype.toLocaleLowerCase
---
## String.prototype.toLocaleLowerCase
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-tolocalelowercase/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,15 @@
---
title: String.prototype.toLocaleUpperCase
---
## String.prototype.toLocaleUpperCase
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-tolocaleuppercase/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,25 @@
---
title: String.prototype.toLowerCase
---
The JavaScript array method `.toLowerCase()` will return the value of the string converted to lower case. The original string is not changed.
**Syntax**
```javascript
string.toLowerCase()
```
## Examples
```javascript
var shout = "I AM SHOUTING VERY LOUDLY"
var whisper = shout.toLowerCase()
console.log(shout) // will return "I AM SHOUTING VERY LOUDLY"
console.log(whisper) // will return "i am shouting very loudly"
```
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->
Source : <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase' target='_blank' rel='nofollow'>MDN</a>

View File

@ -0,0 +1,15 @@
---
title: String.prototype.toString
---
## String.prototype.toString
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-tostring/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,14 @@
---
title: String.prototype.toUpperCase
---
The JavaScript method `.toUpperCase()` returns the same string it was called on, but in all upper case.
**Syntax**
str.toUpperCase()
## Examples
console.log("hello world".toUpperCase()); // Console will output "HELLO WORLD"
Source <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase' target='_blank' rel='nofollow'>MDN</a>

View File

@ -0,0 +1,20 @@
---
title: String.prototype.trim
---
## String.prototype.trim
The `trim()` function removes any whitespace characters from both the beginning and the end of a given string. It does not modify the original string; it outputs a new one.
Examples:
```js
" Hello, campers. I have spaces on both ends! ".trim();
// output is "Hello, campers. I have spaces on both ends!"
```
`trim()` not only removes space characters; it removes any whitespace character, such as tabs, line-breaks, no-break spaces, etc.
This is useful, for example, when you want to process a text input from a user and they might have submitted a string with spaces at the end that you might not want.
#### More Information:
- [String.prototype.trim() on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim)

View File

@ -0,0 +1,15 @@
---
title: String.prototype.trimLeft
---
## String.prototype.trimLeft
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-trimleft/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,15 @@
---
title: String.prototype.trimright
---
## String.prototype.trimright
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-trimright/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,15 @@
---
title: String.prototype.valueOf
---
## String.prototype.valueOf
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-valueof/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->

View File

@ -0,0 +1,15 @@
---
title: String Raw
---
## String Raw
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-raw/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->