Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7884113

Browse files
initial commit
1 parent edb8608 commit 7884113

File tree

4 files changed

+48
-13
lines changed

4 files changed

+48
-13
lines changed

‎Day 7/Regular Expressions I.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function regexVar() {
2+
/*
3+
* Declare a RegExp object variable named 're'
4+
* It must match a string that starts and ends with the same vowel (i.e., {a, e, i, o, u})
5+
*/
6+
7+
var re = RegExp(/^([aeiou]).*1円$/);
8+
/*
9+
* Do not remove the return statement
10+
*/
11+
return re;
12+
}

‎Day 7/Regular Expressions II.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function regexVar() {
2+
/*
3+
* Declare a RegExp object variable named 're'
4+
* It must match a string that starts with 'Mr.', 'Mrs.', 'Ms.', 'Dr.', or 'Er.',
5+
* followed by one or more letters.
6+
*/
7+
8+
var re = (/^(Mr\.|Dr\.|Er\.|Ms\.|Mrs\.)\s?[a-z|A-Z]+$/);
9+
/*
10+
* Do not remove the return statement
11+
*/
12+
return re;
13+
}

‎Day 7/Regular Expressions III.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function regexVar() {
2+
/*
3+
* Declare a RegExp object variable named 're'
4+
* It must match ALL occurrences of numbers in a string.
5+
*/
6+
7+
var re = RegExp('\\d+', 'g');
8+
/*
9+
* Do not remove the return statement
10+
*/
11+
return re;
12+
}

‎Day 9/index.html

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,21 @@
33

44
<head>
55
<meta charset="utf-8">
6-
<title>Binary Calculator</title>
76
<link rel="stylesheet" href="css/binaryCalculator.css" type="text/css">
7+
<title>Binary Calculator</title>
88
</head>
99

1010
<body>
11-
<div id="container">
12-
<div id="res"></div>
13-
<div id="btns">
14-
<button id="btn0" onclick="clickZero()">0</button>
15-
<button id="btn1" onclick="clickOne()">1</button>
16-
<button id="btnClr" onclick="clickClr()">C</button>
17-
<button id="btnEql" onclick="clickEql()">=</button>
18-
<button id="btnSum" onclick="clickSum()">+</button>
19-
<button id="btnSub" onclick="clickSub()">-</button>
20-
<button id="btnMul" onclick="clickMul()">*</button>
21-
<button id="btnDiv" onclick="clickDiv()">/</button>
22-
</div>
11+
<div id="res" class="resultClass"> </div>
12+
<div id="btns" class="buttonContainer">
13+
<button id="btn0" class="buttonClass"> 0 </button>
14+
<button id="btn1" class="buttonClass"> 1 </button>
15+
<button id="btnClr" class="buttonClass"> C </button>
16+
<button id="btnEql" class="buttonClass"> = </button>
17+
<button id="btnSum" class="buttonClass"> + </button>
18+
<button id="btnSub" class="buttonClass"> - </button>
19+
<button id="btnMul" class="buttonClass"> * </button>
20+
<button id="btnDiv" class="buttonClass"> / </button>
2321
</div>
2422
<script src="js/binaryCalculator.js" type="text/javascript"></script>
2523
</body>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /