[READ-ONLY] Mirror of https://github.com/probablykasper/playground.
playground.kasper.space
350 B
13 lines
1"use strict"
2
3//Checks (bool) if getElementsByClassName is supported
4if (document.getElementsByClassName) {}
5
6var myRE = /hello/;
7var myString = "Does this sentence have the word hello in it?";
8// Checks if the word "hello" is in myString
9if (myRE.test(myString)) {
10 console.log("\"" +myRE+ "\": Yes");
11} else {
12 console.log("\"" +myRE+ "\": No");
13}