forked from GuildCrafts/core-vanilla-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Master #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
allyface
wants to merge
4
commits into
empty-two
Choose a base branch
from
master
base: empty-two
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Master #5
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| function accumulate() { | ||
| return "hello" | ||
| } | ||
|
|
||
| module.exports {accumulate} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| var BeerSong = function(){}; | ||
|
|
||
| BeerSong.prototype.verse = function (verse) { | ||
|
|
||
| if (verse === 2) { | ||
| song = (verse + ' bottles of beer on the wall, ' + verse + ' bottles of beer.\nTake one down and pass it around, ' + (verse - 1) + ' bottle of beer on the wall.\n'); | ||
| } else if (verse === 1) { | ||
| song = ('1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n') | ||
| } else if (verse === 0) { | ||
| song = ('No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n'); | ||
| } else { | ||
| song = (verse + ' bottles of beer on the wall, ' + verse + ' bottles of beer.\nTake one down and pass it around, ' + (verse - 1) + ' bottles of beer on the wall.\n'); | ||
| } | ||
| return song; | ||
| } | ||
|
|
||
| BeerSong.prototype.sing = function (start, stop) { | ||
|
|
||
| var song = ''; | ||
|
|
||
| if (stop === undefined) { | ||
|
|
||
| stop = 0; | ||
|
|
||
| while (start > 2) { | ||
| song += (start + ' bottles of beer on the wall, ' + start + ' bottles of beer.\nTake one down and pass it around, ' + (start - 1) + ' bottles of beer on the wall.\n\n'); | ||
| start--; | ||
| } | ||
|
|
||
| if (start === 2) { | ||
| song += ('2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n\n') | ||
| start--; | ||
| } | ||
|
|
||
| if (start === 1) { | ||
| song += ('1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n\n') | ||
| start--; | ||
| } | ||
|
|
||
| if (start === 0) { | ||
| song += ('No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n'); | ||
| return song; | ||
| } | ||
|
|
||
| } else if (stop > 2) { | ||
|
|
||
| while (start > stop && stop > 2) { | ||
| song += (start + ' bottles of beer on the wall, ' + start + ' bottles of beer.\nTake one down and pass it around, ' + (start - 1) + ' bottles of beer on the wall.\n\n'); | ||
| start--; | ||
| } | ||
|
|
||
| song = song + stop + ' bottles of beer on the wall, ' + stop + ' bottles of beer.\nTake one down and pass it around, ' + (stop - 1) + ' bottles of beer on the wall.\n' | ||
| return song; | ||
|
|
||
| } else { | ||
|
|
||
| while (start > 2) { | ||
| song += (start + ' bottles of beer on the wall, ' + start + ' bottles of beer.\nTake one down and pass it around, ' + (start - 1) + ' bottles of beer on the wall.\n\n'); | ||
| start--; | ||
| } | ||
|
|
||
| if (start === 2) { | ||
| song += (start + ' bottles of beer on the wall, ' + start + ' bottles of beer.\nTake one down and pass it around, ' + (start - 1) + ' bottle of beer on the wall.\n'); | ||
| start--; | ||
| } | ||
|
|
||
| if (start === 1) { | ||
| song += ('1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n\n') | ||
| start--; | ||
| } | ||
|
|
||
| if (start === 0) { | ||
| song += ('No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n'); | ||
| } | ||
| return song; | ||
| } | ||
| } | ||
|
|
||
| module.exports = BeerSong; | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // Checks each value of string for whether it is an opening bracket or a closing bracket | ||
| // Checks that each opening bracket is matched with a closing bracket | ||
| // If any opening bracket or closing bracket does not have a matched bracket, return False | ||
| // Checks that opening bracket occurs at an earlier index than its matched closing bracket | ||
| // If not, return False | ||
| // | ||
|
|
||
|
|
||
| // Ana's notes: | ||
| // Innermost opening bracket (last to open) needs to close before any previous opening brackets | ||
| // When a bracket closes properly then its pair is checked off | ||
| // Iterate through string input | ||
| // Push opening brackets to empty array "openBrackets" | ||
|
|
||
|
|
||
|
|
||
| // iterate through string | ||
|
|
||
|
|
||
| function bracket(string) { | ||
|
|
||
|
|
||
| } |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| var Diamond = function() {} | ||
|
|
||
| Diamond.prototype.makeDiamond = function(letter) { | ||
|
|
||
| } | ||
|
|
||
| module.exports = Diamond; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,213 @@ | ||
| module.exports = { | ||
| "env": { | ||
| "browser": true | ||
| }, | ||
| "extends": "eslint:recommended", | ||
| "rules": { | ||
| "accessor-pairs": "error", | ||
| "array-bracket-spacing": "error", | ||
| "array-callback-return": "error", | ||
| "arrow-body-style": "error", | ||
| "arrow-parens": "error", | ||
| "arrow-spacing": "error", | ||
| "block-scoped-var": "error", | ||
| "block-spacing": "error", | ||
| "brace-style": "error", | ||
| "callback-return": "error", | ||
| "camelcase": "error", | ||
| "capitalized-comments": "error", | ||
| "class-methods-use-this": "error", | ||
| "comma-dangle": "error", | ||
| "comma-spacing": "error", | ||
| "comma-style": "error", | ||
| "complexity": "error", | ||
| "computed-property-spacing": "error", | ||
| "consistent-return": "error", | ||
| "consistent-this": "error", | ||
| "curly": "error", | ||
| "default-case": "error", | ||
| "dot-location": "error", | ||
| "dot-notation": "error", | ||
| "eol-last": [ | ||
| "error", | ||
| "never" | ||
| ], | ||
| "eqeqeq": "error", | ||
| "func-call-spacing": "error", | ||
| "func-name-matching": "error", | ||
| "func-names": "error", | ||
| "func-style": "error", | ||
| "generator-star-spacing": "error", | ||
| "global-require": "error", | ||
| "guard-for-in": "error", | ||
| "handle-callback-err": "error", | ||
| "id-blacklist": "error", | ||
| "id-length": "error", | ||
| "id-match": "error", | ||
| "indent": "error", | ||
| "init-declarations": "error", | ||
| "jsx-quotes": "error", | ||
| "key-spacing": "error", | ||
| "keyword-spacing": "error", | ||
| "line-comment-position": "error", | ||
| "linebreak-style": "error", | ||
| "lines-around-comment": "error", | ||
| "lines-around-directive": "error", | ||
| "max-depth": "error", | ||
| "max-len": "error", | ||
| "max-lines": "error", | ||
| "max-nested-callbacks": "error", | ||
| "max-params": "error", | ||
| "max-statements": "error", | ||
| "max-statements-per-line": "error", | ||
| "multiline-ternary": "error", | ||
| "new-cap": "error", | ||
| "new-parens": "error", | ||
| "newline-after-var": "error", | ||
| "newline-before-return": "error", | ||
| "newline-per-chained-call": "error", | ||
| "no-alert": "error", | ||
| "no-array-constructor": "error", | ||
| "no-await-in-loop": "error", | ||
| "no-bitwise": "error", | ||
| "no-caller": "error", | ||
| "no-catch-shadow": "error", | ||
| "no-compare-neg-zero": "error", | ||
| "no-confusing-arrow": "error", | ||
| "no-continue": "error", | ||
| "no-div-regex": "error", | ||
| "no-duplicate-imports": "error", | ||
| "no-else-return": "error", | ||
| "no-empty-function": "error", | ||
| "no-eq-null": "error", | ||
| "no-eval": "error", | ||
| "no-extend-native": "error", | ||
| "no-extra-bind": "error", | ||
| "no-extra-label": "error", | ||
| "no-extra-parens": "error", | ||
| "no-floating-decimal": "error", | ||
| "no-implicit-coercion": "error", | ||
| "no-implicit-globals": "error", | ||
| "no-implied-eval": "error", | ||
| "no-inline-comments": "error", | ||
| "no-invalid-this": "error", | ||
| "no-iterator": "error", | ||
| "no-label-var": "error", | ||
| "no-labels": "error", | ||
| "no-lone-blocks": "error", | ||
| "no-lonely-if": "error", | ||
| "no-loop-func": "error", | ||
| "no-magic-numbers": "error", | ||
| "no-mixed-operators": "error", | ||
| "no-mixed-requires": "error", | ||
| "no-multi-assign": "error", | ||
| "no-multi-spaces": "error", | ||
| "no-multi-str": "error", | ||
| "no-multiple-empty-lines": "error", | ||
| "no-native-reassign": "error", | ||
| "no-negated-condition": "error", | ||
| "no-negated-in-lhs": "error", | ||
| "no-nested-ternary": "error", | ||
| "no-new": "error", | ||
| "no-new-func": "error", | ||
| "no-new-object": "error", | ||
| "no-new-require": "error", | ||
| "no-new-wrappers": "error", | ||
| "no-octal-escape": "error", | ||
| "no-param-reassign": "error", | ||
| "no-path-concat": "error", | ||
| "no-plusplus": "error", | ||
| "no-process-env": "error", | ||
| "no-process-exit": "error", | ||
| "no-proto": "error", | ||
| "no-prototype-builtins": "error", | ||
| "no-restricted-globals": "error", | ||
| "no-restricted-imports": "error", | ||
| "no-restricted-modules": "error", | ||
| "no-restricted-properties": "error", | ||
| "no-restricted-syntax": "error", | ||
| "no-return-assign": "error", | ||
| "no-return-await": "error", | ||
| "no-script-url": "error", | ||
| "no-self-compare": "error", | ||
| "no-sequences": "error", | ||
| "no-shadow": "error", | ||
| "no-shadow-restricted-names": "error", | ||
| "no-spaced-func": "error", | ||
| "no-sync": "error", | ||
| "no-tabs": "error", | ||
| "no-template-curly-in-string": "error", | ||
| "no-ternary": "error", | ||
| "no-throw-literal": "error", | ||
| "no-trailing-spaces": "error", | ||
| "no-undef-init": "error", | ||
| "no-undefined": "error", | ||
| "no-underscore-dangle": "error", | ||
| "no-unmodified-loop-condition": "error", | ||
| "no-unneeded-ternary": "error", | ||
| "no-unused-expressions": "error", | ||
| "no-use-before-define": "error", | ||
| "no-useless-call": "error", | ||
| "no-useless-computed-key": "error", | ||
| "no-useless-concat": "error", | ||
| "no-useless-constructor": "error", | ||
| "no-useless-escape": "error", | ||
| "no-useless-rename": "error", | ||
| "no-useless-return": "error", | ||
| "no-var": "error", | ||
| "no-void": "error", | ||
| "no-warning-comments": "error", | ||
| "no-whitespace-before-property": "error", | ||
| "no-with": "error", | ||
| "nonblock-statement-body-position": "error", | ||
| "object-curly-newline": "error", | ||
| "object-curly-spacing": "error", | ||
| "object-property-newline": "error", | ||
| "object-shorthand": "error", | ||
| "one-var": "error", | ||
| "one-var-declaration-per-line": "error", | ||
| "operator-assignment": "error", | ||
| "operator-linebreak": "error", | ||
| "padded-blocks": "error", | ||
| "prefer-arrow-callback": "error", | ||
| "prefer-const": "error", | ||
| "prefer-destructuring": "error", | ||
| "prefer-numeric-literals": "error", | ||
| "prefer-promise-reject-errors": "error", | ||
| "prefer-reflect": "error", | ||
| "prefer-rest-params": "error", | ||
| "prefer-spread": "error", | ||
| "prefer-template": "error", | ||
| "quote-props": "error", | ||
| "quotes": "error", | ||
| "radix": "error", | ||
| "require-await": "error", | ||
| "require-jsdoc": "error", | ||
| "rest-spread-spacing": "error", | ||
| "semi": "error", | ||
| "semi-spacing": "error", | ||
| "sort-imports": "error", | ||
| "sort-keys": "error", | ||
| "sort-vars": "error", | ||
| "space-before-blocks": "error", | ||
| "space-before-function-paren": "error", | ||
| "space-in-parens": "error", | ||
| "space-infix-ops": "error", | ||
| "space-unary-ops": "error", | ||
| "spaced-comment": "error", | ||
| "strict": "error", | ||
| "symbol-description": "error", | ||
| "template-curly-spacing": "error", | ||
| "template-tag-spacing": "error", | ||
| "unicode-bom": [ | ||
| "error", | ||
| "never" | ||
| ], | ||
| "valid-jsdoc": "error", | ||
| "vars-on-top": "error", | ||
| "wrap-iife": "error", | ||
| "wrap-regex": "error", | ||
| "yield-star-spacing": "error", | ||
| "yoda": "error" | ||
| } | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would start to challenge yourself to rethink how you are structuring your algorithms... when I see multiple if statements that is a red flag