This repository has been archived by the owner on Aug 4, 2019. It is now read-only.
forked from oakmac/js101
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit dcf250f
Showing
10 changed files
with
2,354 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# This file is for unifying the coding style for different editors and IDEs. | ||
# More information at http://EditorConfig.org | ||
|
||
# Do not check for any .editorconfig files above this directory | ||
root = true | ||
|
||
# All files | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
exercises-modules | ||
|
||
# ignore diff files | ||
*.diff |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
ISC License | ||
|
||
Copyright (c) 2019, Chris Oakman | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any purpose | ||
with or without fee is hereby granted, provided that the above copyright notice | ||
and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS | ||
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER | ||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF | ||
THIS SOFTWARE. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# JavaScript 101 - Programming Exercises | ||
|
||
Programming exercises for a beginning JavaScript programmer. | ||
|
||
These exercises use Strings, loops, Objects, and Arrays to solve logic problems. | ||
|
||
## Install | ||
|
||
Make sure that [Node.js] and [npm] are installed. Then, from this directory type: | ||
|
||
```sh | ||
npm install | ||
``` | ||
|
||
This will install a folder named `node_modules/` into this folder. | ||
|
||
## Directions | ||
|
||
You will be writing functions in the JavaScript files found in the `exercises/` | ||
folder. | ||
|
||
Write your functions and then run: | ||
|
||
```sh | ||
npm test | ||
``` | ||
|
||
The goal is to get the test suite to pass all conditions. Good luck! | ||
|
||
## Continuously Run Test Suite | ||
|
||
You may want to run the test suite anytime a file in `exercises/` changes: | ||
|
||
```sh | ||
npm run watch | ||
``` | ||
|
||
This command will continuously run the test suite and stop on the first failing | ||
test. | ||
|
||
## License | ||
|
||
[ISC License](LICENSE.md) | ||
|
||
[Node.js]:https://nodejs.org/ | ||
[npm]:https://en.wikipedia.org/wiki/Npm_(software) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Let's write some functions that 1) create a variable and 2) return it | ||
|
||
// Declare a variable "myNum" and assign any number to it, then return "myNum". | ||
// NOTE: "myNum" can be any valid JavaScript number | ||
function makeANumber () { | ||
|
||
} | ||
|
||
// Declare a variable "myInt" and assign an integer to it, then return "myInt" | ||
function makeAnInteger () { | ||
|
||
} | ||
|
||
// Declare a variable "myFloat" and assign a floating point number to it, then return "myFloat" | ||
function makeAFloat () { | ||
|
||
} | ||
|
||
// Declare a variable "zero" and assign the number 0 to it, then return "zero" | ||
function makeZero () { | ||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/* | ||
function makeNothing () { | ||
// Declare and instantiate a string "Hello World!" and return it | ||
} | ||
function makeAString () { | ||
// Declare and instantiate an array containing the string "Hello World!" and the number 4 and return it | ||
} | ||
function makeAnArray () { | ||
// Declare and instantiate an object containing the key-value pairs key1 -> "Hello World!" and key2 -> 4, and return it | ||
} | ||
function lvl1exercise7 () { | ||
// Declare and instantiate a boolean value 'false' and return it | ||
} | ||
*/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// TODO: write me |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// TODO: write me |
Oops, something went wrong.