Created
October 27, 2019 18:35
-
-
Save hillbilly300/f3ef520f408b969b5b445156725c5203 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/zomemib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
//jshint esnext:true | |
let string1 = "The quick brown fox jumps over the lazy dog.?" | |
let string2 = "If the dog reacted, was it really lazy" | |
// accessing string chars | |
// charAt,charCodeAt | |
console.log(string1.charAt(1)) | |
console.log(string1.charCodeAt(1)) | |
//searching | |
//includes,match | |
console.log(string1.match(/[A-z]/gi)) | |
console.log(string1.includes('qu')) | |
console.log(string2.endsWith('was it really lazy')) | |
// manipulate | |
// replace,split | |
console.log(string1.replace(/s/,'')) | |
console.log(string1.replace('fox','goat')) | |
console.log(string1.split(' ')) | |
// formatting | |
// toLowerCase, toUpperCase, trim | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">//jshint esnext:true | |
let string1 = "The quick brown fox jumps over the lazy dog.?" | |
let string2 = "If the dog reacted, was it really lazy" | |
// accessing string chars | |
// charAt,charCodeAt | |
console.log(string1.charAt(1)) | |
console.log(string1.charCodeAt(1)) | |
//searching | |
//includes,match | |
console.log(string1.match(/[A-z]/gi)) | |
console.log(string1.includes('qu')) | |
console.log(string2.endsWith('was it really lazy')) | |
// manipulate | |
// replace,split | |
console.log(string1.replace(/s/,'')) | |
console.log(string1.replace('fox','goat')) | |
console.log(string1.split(' ')) | |
// formatting | |
// toLowerCase, toUpperCase, trim</script></body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//jshint esnext:true | |
let string1 = "The quick brown fox jumps over the lazy dog.?" | |
let string2 = "If the dog reacted, was it really lazy" | |
// accessing string chars | |
// charAt,charCodeAt | |
console.log(string1.charAt(1)) | |
console.log(string1.charCodeAt(1)) | |
//searching | |
//includes,match | |
console.log(string1.match(/[A-z]/gi)) | |
console.log(string1.includes('qu')) | |
console.log(string2.endsWith('was it really lazy')) | |
// manipulate | |
// replace,split | |
console.log(string1.replace(/s/,'')) | |
console.log(string1.replace('fox','goat')) | |
console.log(string1.split(' ')) | |
// formatting | |
// toLowerCase, toUpperCase, trim |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment