Update 02_day_data_types.md

pull/84/head
Chety 5 years ago committed by GitHub
parent 6c3be24135
commit 00536c900e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -610,7 +610,7 @@ string.charCodeAt(index)
```js ```js
let string = '30 Days Of JavaScript' let string = '30 Days Of JavaScript'
console.log(string.charCodeAt(3)) // D ASCII number is 51 console.log(string.charCodeAt(3)) // D ASCII number is 68
let lastIndex = string.length - 1 let lastIndex = string.length - 1
console.log(string.charCodeAt(lastIndex)) // t ASCII is 116 console.log(string.charCodeAt(lastIndex)) // t ASCII is 116
@ -685,7 +685,7 @@ console.log(country.startsWith('fin')) // false
console.log(country.startsWith('land')) // false console.log(country.startsWith('land')) // false
``` ```
17. *endsWith*: it takes a substring as an argument and it checks if the string starts with that specified substring. It returns a boolean(true or false). 17. *endsWith*: it takes a substring as an argument and it checks if the string ends with that specified substring. It returns a boolean(true or false).
```js ```js
string.endsWith(substring) string.endsWith(substring)

Loading…
Cancel
Save