From 1a9c807633efc9b36454b5e0697197b97bf22280 Mon Sep 17 00:00:00 2001 From: Yasholo Date: Wed, 13 Sep 2023 15:17:16 +0530 Subject: [PATCH 1/7] Organised the files and folders --- .../01-Basic-JavaScript}/.DS_Store | Bin .../001-CommentYourJavaScriptCode.js | 0 .../002-DeclareJavaScriptVariables.js | 0 .../003-StoringValueswiththeAssignmentOperator.js | 0 .../004-AssigningtheValueofOneVariabletoAnother.js | 0 ...nitializingVariableswiththeAssignmentOperator.js | 0 .../006-UnderstandingUninitializedVariables.js | 0 .../007-UnderstandingCaseSensitivityinVariables.js | 0 .../008-AddTwoNumberswithJavaScript.js | 0 ...09-SubtractOneNumberfromAnotherwithJavaScript.js | 0 .../010-MultiplyTwoNumberswithJavaScript.js | 0 .../011-DivideOneNumberbyAnotherwithJavaScript.js | 0 .../012-IncrementaNumberwithJavaScript.js | 0 .../013-DecrementaNumberwithJavaScript.js | 0 .../014-CreateDecimalNumberswithJavaScript.js | 0 .../015-MultiplyTwoDecimalswithJavaScript.js | 0 .../016-DivideOneDecimalbyAnotherwithJavaScript.js | 0 .../017-FindingaRemainderinJavaScript.js | 0 .../018-CompoundAssignmentWithAugmentedAddition.js | 0 ...19-CompoundAssignmentWithAugmentedSubtraction.js | 0 ...are-Scopes-of-the-var-and-let-Keywords_script.js | 0 ...02.Mutate-an-Array-Declared-with-const_script.js | 0 .../02-ES6}/03.Prevent-Object-Mutation_script.js | 0 ...s-to-Write-Concise-Anonymous-Functions_script.js | 0 ....Write-Arrow-Functions-with-Parameters_script.js | 0 ...-Default-Parameters-for-Your-Functions_script.js | 0 ...est-Parameter-with-Function-Parameters_script.js | 0 ...d-Operator-to-Evaluate-Arrays-In-Place_script.js | 0 ...ignment-to-Extract-Values-from-Objects_script.js | 0 ...nment-to-Assign-Variables-from-Objects_script.js | 0 ...o-Assign-Variables-from-Nested-Objects_script.js | 0 ...gnment-to-Assign-Variables-from-Arrays_script.js | 0 ...t-Parameter-to-Reassign-Array-Elements_script.js | 0 ...s-an-Object-as-a-Function's-Parameters_script.js | 0 ...Create-Strings-using-Template-Literals_script.js | 0 ...ations-Using-Object-Property-Shorthand_script.js | 0 ...Concise-Declarative-Functions-with-ES6_script.js | 0 ...yntax-to-Define-a-Constructor-Function_script.js | 0 ...setters-to-Control-Access-to-an-Object_script.js | 0 .../02-ES6}/20.Create-a-Module-Script_index.html | 0 .../21.Use-export-to-Share-a-Code-Block_script.js | 0 .../22.Reuse-JavaScript-Code-Using-import_script.js | 0 ...3.Use-to-Import-Everything-from-a-File_script.js | 0 ...an-Export-Fallback-with-export-default_script.js | 0 .../02-ES6}/25.Import-a-Default-Export_script.js | 0 .../26.Create-a-JavaScript-Promise_script.js | 0 ...lete-a-Promise-with-resolve-and-reject_script.js | 0 ...8.Handle-a-Fulfilled-Promise-with-then_script.js | 0 ...9.Handle-a-Rejected-Promise-with-catch_script.js | 0 .../01-Basic-JavaScript/02-ES6}/moverenamefile.sh | 0 ...CompoundAssignmentWithAugmentedMultiplication.js | 0 .../021-CompoundAssignmentWithAugmentedDivision.js | 0 .../022-DeclareStringVariables.js | 0 .../023-EscapingLiteralQuotesinStrings.js | 0 .../024-QuotingStringswithSingleQuotes.js | 0 .../025-EscapeSequencesinStrings.js | 0 .../026-ConcatenatingStringswithPlusOperator.js | 0 ...ConcatenatingStringswiththePlusEqualsOperator.js | 0 .../028-ConstructingStringswithVariables.js | 0 .../029-AppendingVariablestoStrings.js | 0 .../01.Using-the-Test-Method_script.js | 0 .../02.Match-Literal-Strings_script.js | 0 ...al-String-with-Different-Possibilities_script.js | 0 .../04.Ignore-Case-While-Matching_script.js | 0 .../05.Extract-Matches_script.js | 0 .../06.Find-More-Than-the-First-Match_script.js | 0 .../07.Match-with-Wildcard-Period_script.js | 0 ...tch-Single-with-Multiple-Possibilities_script.js | 0 .../09.Match-Letters-of-the-Alphabet_script.js | 0 ...ch-Numbers-and-Letters-of-the-Alphabet_script.js | 0 ....Match-Single-Characters-Not-Specified_script.js | 0 ...haracters-that-Occur-One-or-More-Times_script.js | 0 ...aracters-that-Occur-Zero-or-More-Times_script.js | 0 .../14.Find-Characters-with-Lazy-Matching_script.js | 0 ...5.Find-One-or-More-Criminals-in-a-Hunt_script.js | 0 .../16.Match-Beginning-String-Patterns_script.js | 0 .../17.Match-Ending-String-Patterns_script.js | 0 .../18.Match-All-Letters-and-Numbers_script.js | 0 .../20.Match-All-Numbers_script.js | 0 .../21.Match-All-Non-Numbers_script.js | 0 .../22.Restrict-Possible-Usernames_script.js | 0 .../23.Match-Whitespace_script.js | 0 .../24.Match-Non-Whitespace-Characters_script.js | 0 ...cify Upper-and-Lower-Number-of-Matches_script.js | 0 ...ecify-Only-the-Lower-Number-of-Matches_script.js | 0 .../27.Specify-Exact-Number-of-Matches_script.js | 0 .../28.Check-for-All-or-None_script.js | 0 .../29.Positive-and-Negative-Lookahead_script.js | 0 ...Check-For-Mixed-Grouping-of-Characters_script.js | 0 ...31.Reuse-Patterns-Using-Capture-Groups_script.js | 0 ...e-Capture-Groups-to-Search-and-Replace_script.js | 0 ...3.Remove-Whitespace-from-Start-and-End_script.js | 0 ...tch Everything-But-Letters-and-Numbers_script.js | 0 .../030-FindtheLengthofaString.js | 0 ...acketNotationtoFindtheFirstCharacterinaString.js | 0 .../032-UnderstandStringImmutability.js | 0 ...BracketNotationtoFindtheNthCharacterinaString.js | 0 ...racketNotationtoFindtheLastCharacterinaString.js | 0 ...otationtoFindtheNth-to-LastCharacterinaString.js | 0 .../01-Basic-JavaScript}/036-WordBlanks.js | 0 ...tipleValuesinoneVariableusingJavaScriptArrays.js | 0 .../038-NestoneArraywithinAnotherArray.js | 0 .../039-AccessArrayDatawithIndexes.js | 0 ...nsole-to-Check-the-Value-of-a-Variable_script.js | 0 ...n-the-freeCodeCamp-and-Browser-Console_script.js | 0 ...typeof-to-Check-the-Type-of-a-Variable_script.js | 0 ...Misspelled-Variable-and-Function-Names_script.js | 0 ...Parentheses-Brackets-Braces-and-Quotes_script.js | 0 ...ixed-Usage-of-Single-and-Double-Quotes_script.js | 0 ...-Operator-Instead-of-Equality-Operator_script.js | 0 ...sing-Parenthesis-After-a-Function-Call_script.js | 0 ...he-Wrong-Order-When-Calling-a-Function_script.js | 0 ...-Off-By-One-Errors-When-Using-Indexing_script.js | 0 ...Reinitializing-Variables-Inside-a-Loop_script.js | 0 ...-Loops-with-a-Valid-Terminal-Condition_script.js | 0 .../040-ModifyArrayDataWithIndexes.js | 0 .../041-AccessMulti-DimensionalArraysWithIndexes.js | 0 .../042-ManipulateArraysWithpush().js | 0 .../043-ManipulateArraysWithpop().js | 0 .../044-ManipulateArraysWithshift().js | 0 .../045-ManipulateArraysWithunshift().js | 0 .../01-Basic-JavaScript}/046-ShoppingList.js | 0 .../047-WriteReusableJavaScriptwithFunctions.js | 0 .../048-PassingValuestoFunctionswithArguments.js | 0 .../049-GlobalScopeandFunctions.js | 0 ...an-Array-to-Store-a-Collection-of-Data_script.js | 0 ...cess-an-Array-s-Using-Bracket-Notation_script.js | 0 ...-to-an-Array-with-push()-and-unshift()_script.js | 0 ...s-from-an-Array-with-pop()-and-shift()_script.js | 0 .../05.Remove-Items-Using-splice()_script.js | 0 .../06.Add-Items-Using-splice()_script.js | 0 .../07.Copy-Array-Items-Using-slice()_script.js | 0 ...Copy-an-Array-with-the-Spread-Operator_script.js | 0 ...ombine-Arrays-with-the-Spread-Operator_script.js | 0 ...-Presence-of-an-Element-With-indexOf()_script.js | 0 ...h-All-an-Array's-Items-Using-For-Loops_script.js | 0 ...reate-complex-multi-dimensional-arrays_script.js | 0 ...-Key-Value-Pairs-to-JavaScript-Objects_script.js | 0 ...dify-an-Object-Nested-Within-an-Object_script.js | 0 ...s-Property-Names-with-Bracket-Notation_script.js | 0 ...te-Keyword-to-Remove-Object-Properties_script.js | 0 .../17.Check-if-an-Object-has-a-Property_script.js | 0 ...s-of-an Object-with-a-for-in-Statement_script.js | 0 ...-of-All-Object-Keys-with-Object.keys()_script.js | 0 ...20.Modify-an-Array-Stored-in-an-Object_script.js | 0 .../050-LocalScopeandFunctions.js | 0 .../051-Globalvs.LocalScopeinFunctions.js | 0 .../052-ReturnaValuefromaFunctionwithReturn.js | 0 ...erstandingUndefinedValuereturnedfromaFunction.js | 0 .../054-AssignmentwithaReturnedValue.js | 0 .../01-Basic-JavaScript}/055-StandinLine.js | 0 .../056-UnderstandingBooleanValues.js | 0 .../057-UseConditionalLogicwithIfStatements.js | 0 .../058-ComparisonwiththeEqualityOperator.js | 0 .../059-ComparisonwiththeStrictEqualityOperator.js | 0 .../01.Convert-Celsius-to-Fahrenheit_script.js | 0 .../02.Reverse-a-String_script.js | 0 .../03.Factorialize-a-Number_script.js | 0 .../04.Find-the-Longest-Word-in-a-String_script.js | 0 .../05.Return-Largest-Numbers-in-Arrays_script.js | 0 .../06.Confirm-the-Ending_script.js | 0 .../07.Repeat-a-String-Repeat-a-String_script.js | 0 .../08.Truncate-a-String_script.js | 0 .../09.Finders-Keepers_script.js | 0 .../10.Boo-who_script.js | 0 .../11.Title-Case-a-Sentence_script.js | 0 .../12.Slice-and-Splice_script.js | 0 .../13.Falsy-Bouncer_script.js | 0 .../14.Where-do-I-Belong_script.js | 0 .../15.Mutations_script.js | 0 .../16.Chunky-Monkey_script.js | 0 .../060-Practicecomparingdifferentvalues.js | 0 .../061-ComparisonwiththeInequalityOperator.js | 0 ...062-ComparisonwiththeStrictInequalityOperator.js | 0 .../063-ComparisonwiththeGreaterThanOperator.js | 0 ...ComparisonwiththeGreaterThanOrEqualToOperator.js | 0 .../065-ComparisonwiththeLessThanOperator.js | 0 ...66-ComparisonwiththeLessThanOrEqualToOperator.js | 0 .../067-ComparisonswiththeLogicalAndOperator.js | 0 .../068-ComparisonswiththeLogicalOrOperator.js | 0 .../069-IntroducingElseStatements.js | 0 .../01.Create-a-Basic-JavaScript-Object_script.js | 0 ...-to-Access-the-Properties-of-an-Object_script.js | 0 .../03.Create-a-Method-on-an-Object_script.js | 0 ...de-More-Reusable-with-the-this-Keyword_script.js | 0 .../05.Define-a-Constructor-Function_script.js | 0 ...06.Use-a-Constructor-to-Create-Objects_script.js | 0 ...tend-Constructors-to-Receive-Arguments_script.js | 0 ...n-Object's-Constructor-with-instanceof_script.js | 0 .../09.Understand-Own-Properties_script.js | 0 ...pe-Properties-to-Reduce-Duplicate-Code_script.js | 0 .../11.Iterate-Over-All-Properties_script.js | 0 ...12.Understand-the-Constructor-Property_script.js | 0 ...3.Change-the-Prototype-to-a-New-Object_script.js | 0 ...r-Property-when-Changing-the-Prototype_script.js | 0 ...ect\342\200\231s-Prototype-Comes-From_script.js" | 0 .../16.Understand-the-Prototype-Chain_script.js | 0 ...heritance-So-You-Don't-Repeat-Yourself_script.js | 0 .../18.Inherit-Behaviors-from-a-Supertype_script.js | 0 ...Prototype-to-an-Instance-of-the-Parent_script.js | 0 ...eset-an-Inherited-Constructor-Property_script.js | 0 .../21.Add-Methods-After-Inheritance_script.js | 0 .../22.Override-Inherited-Methods_script.js | 0 ...mon-Behavior-Between-Unrelated-Objects_script.js | 0 ...-Object-from-Being-Modified-Externally_script.js | 0 ...ely-Invoked-Function-Expression-(IIFE)_script.js | 0 .../26.Use-an-IIFE-to-Create-a-Module_script.js | 0 .../070-IntroducingElseIfStatements.js | 0 .../071-LogicalOrderinIfElseStatements.js | 0 .../072-ChainingIfElseStatements.js | 0 .../01-Basic-JavaScript}/073-GolfCode.js | 0 ...-SelectingfromManyOptionswithSwitchStatements.js | 0 .../075-AddingaDefaultOptioninSwitchStatements.js | 0 ...76-MultipleIdenticalOptionsinSwitchStatements.js | 0 .../077-ReplacingIfElseChainswithSwitch.js | 0 .../078-ReturningBooleanValuesfromFunctions.js | 0 .../079-ReturnEarlyPatternforFunctions.js | 0 .../01.Learn-About-Functional-Programming.js | 0 ...Understand-Functional-Programming-Terminology.js | 0 ...derstand-the-Hazards-of-Using-Imperative-Code.js | 0 ...and-Side-Effects-Using-Functional-Programming.js | 0 ...ts-to-Avoid-External-Dependence-in-a-Function.js | 0 ...06.Refactor-Global-Variables-Out-of-Functions.js | 0 ...-the-map-Method-to-Extract-Data-from-an-Array.js | 0 .../08.Implement-map-on-a-Prototype.js | 0 ...e-filter-Method-to-Extract-Data-from-an-Array.js | 0 ...10.Implement-the-filter-Method-on-a-Prototype.js | 0 ...eturn-Part-of-an-Array-Using-the-slice-Method.js | 0 ...s-from-an-Array-Using-slice-Instead-of-splice.js | 0 ...13.Combine-Two-Arrays-Using-the-concat-Method.js | 0 ...-End-of-an-Array-Using-concat-Instead-of-push.js | 0 .../15.Use-the-reduce-Method-to-Analyze-Data.js | 0 ...p-filter-or-reduce-to-Solve-a-Complex-Problem.js | 0 ...an-Array-Alphabetically-using-the-sort-Method.js | 0 ...ted-Array-Without-Changing-the-Original-Array.js | 0 ...a-String-into-an-Array-Using-the-split-Method.js | 0 ...-an-Array-into-a-String-Using-the-join-Method.js | 0 ...l-Programming-to-Convert-Strings-to-URL-Slugs.js | 0 ...at-Every-Element-in-an-Array-Meets-a-Criteria.js | 0 ...that-Any-Elements-in-an-Array-Meet-a-Criteria.js | 0 ...roduction-to-Currying-and-Partial-Application.js | 0 .../01-Basic-JavaScript}/080-CountingCards.js | 0 .../081-BuildJavaScriptObjects.js | 0 .../082-AccessingObjectPropertieswithDotNotation.js | 0 ...-AccessingObjectPropertieswithBracketNotation.js | 0 .../084-AccessingObjectPropertieswithVariables.js | 0 .../085-UpdatingObjectProperties.js | 0 .../086-AddNewPropertiestoaJavaScriptObject.js | 0 .../087-DeletePropertiesfromaJavaScriptObject.js | 0 .../088-UsingObjectsforLookups.js | 0 .../089-TestingObjectsforProperties.js | 0 .../01.Sum-All-Numbers-in-a-Range.js | 0 .../02.Diff-Two-Arrays.js | 0 .../03.Seek-and-Destroy.js | 0 .../04.Where-art-thou.js | 0 .../05.Spinal-Tap-Case.js | 0 .../06.Pig-Latin.js | 0 .../07.Search-and-Replace.js | 0 .../08.DNA-Pairing.js | 0 .../09.Missing-letters.js | 0 .../10.Sorted-Union.js | 0 .../11.Convert-HTML-Entities.js | 0 .../12.Sum-All-Odd-Fibonacci-Numbers.js | 0 .../13.Sum-All-Primes.js | 0 .../14.Smallest-Common-Multiple.js | 0 .../15.Drop-it.js | 0 .../16.Steamroller.js | 0 .../17.Binary-Agents.js | 0 .../18.Everything-Be-True.js | 0 .../19.Arguments-Optional.js | 0 .../20.Make-a-Person.js | 0 .../21.Map-the-Debris.js | 0 .../090-ManipulatingComplexObjects.js | 0 .../091-AccessingNestedObjects.js | 0 .../092-AccessingNestedArrays.js | 0 .../01-Basic-JavaScript}/093-RecordCollection.js | 0 .../094-IteratewithJavaScriptWhileLoops.js | 0 .../095-IteratewithJavaScriptForLoops.js | 0 .../096-IterateOddNumbersWithaForLoop.js | 0 .../097-CountBackwardsWithaForLoop.js | 0 .../098-IterateThroughanArraywithaForLoop.js | 0 .../01-Basic-JavaScript}/099-NestingForLoops.js | 0 .../Caesars-Cipher.js | 0 .../Cash-Register.js | 0 .../Palindrome-Checker.js | 0 .../Roman-Numeral-Converter.js | 0 .../Telephone-Number-Validator.js | 0 .../100-IteratewithJavaScriptDo...WhileLoops.js | 0 .../101-ReplaceLoopsusingRecursion.js | 0 .../01-Basic-JavaScript}/102-ProfileLookup.js | 0 .../103-GenerateRandomFractionswithJavaScript.js | 0 .../104-GenerateRandomWholeNumberswithJavaScript.js | 0 .../105-GenerateRandomWholeNumberswithinaRange.js | 0 .../106-UsetheparseIntFunction.js | 0 .../107-UsetheparseIntFunctionwithaRadix.js | 0 .../108-UsetheConditional(Ternary)Operator.js | 0 .../109-UsetheConditional(Ternary)Operator.js | 0 .../110-UseRecursiontoCreateaCountdown.js | 0 .../111-UseRecursiontoCreateaRangeofNumbers.js | 0 ...2-DeclareaReadOnlyVariablewiththeconstKeyword.js | 0 ...ExploreDifferencesBetweenthevarandletKeywords.js | 0 .../01-Basic-JavaScript}/rename.sh | 0 302 files changed, 0 insertions(+), 0 deletions(-) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/.DS_Store (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/001-CommentYourJavaScriptCode.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/002-DeclareJavaScriptVariables.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/003-StoringValueswiththeAssignmentOperator.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/004-AssigningtheValueofOneVariabletoAnother.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/005-InitializingVariableswiththeAssignmentOperator.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/006-UnderstandingUninitializedVariables.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/007-UnderstandingCaseSensitivityinVariables.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/008-AddTwoNumberswithJavaScript.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/009-SubtractOneNumberfromAnotherwithJavaScript.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/010-MultiplyTwoNumberswithJavaScript.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/011-DivideOneNumberbyAnotherwithJavaScript.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/012-IncrementaNumberwithJavaScript.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/013-DecrementaNumberwithJavaScript.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/014-CreateDecimalNumberswithJavaScript.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/015-MultiplyTwoDecimalswithJavaScript.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/016-DivideOneDecimalbyAnotherwithJavaScript.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/017-FindingaRemainderinJavaScript.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/018-CompoundAssignmentWithAugmentedAddition.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/019-CompoundAssignmentWithAugmentedSubtraction.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/01.Compare-Scopes-of-the-var-and-let-Keywords_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/02.Mutate-an-Array-Declared-with-const_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/03.Prevent-Object-Mutation_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/04.Use-Arrow-Functions-to-Write-Concise-Anonymous-Functions_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/05.Write-Arrow-Functions-with-Parameters_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/06.Set-Default-Parameters-for-Your-Functions_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/07.Use-the-Rest-Parameter-with-Function-Parameters_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/08.Use-the-Spread-Operator-to-Evaluate-Arrays-In-Place_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/09.Use-Destructuring-Assignment-to-Extract-Values-from-Objects_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/10.Use-Destructuring-Assignment-to-Assign-Variables-from-Objects_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/11.Use-Destructuring-Assignment to-Assign-Variables-from-Nested-Objects_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/12.Use-Destructuring-Assignment-to-Assign-Variables-from-Arrays_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/13.Use-Destructuring-Assignment-with-the-Rest-Parameter-to-Reassign-Array-Elements_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/14.Use-Destructuring-Assignment-to-Pass-an-Object-as-a-Function's-Parameters_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/15.Create-Strings-using-Template-Literals_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/16.Write-Concise-Object-Literal-Declarations-Using-Object-Property-Shorthand_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/17.Write-Concise-Declarative-Functions-with-ES6_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/18.Use-class-Syntax-to-Define-a-Constructor-Function_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/19.Use-getters-and-setters-to-Control-Access-to-an-Object_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/20.Create-a-Module-Script_index.html (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/21.Use-export-to-Share-a-Code-Block_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/22.Reuse-JavaScript-Code-Using-import_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/23.Use-to-Import-Everything-from-a-File_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/24.Create-an-Export-Fallback-with-export-default_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/25.Import-a-Default-Export_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/26.Create-a-JavaScript-Promise_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/27.Complete-a-Promise-with-resolve-and-reject_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/28.Handle-a-Fulfilled-Promise-with-then_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/29.Handle-a-Rejected-Promise-with-catch_script.js (100%) rename {ES6 => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6}/moverenamefile.sh (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/020-CompoundAssignmentWithAugmentedMultiplication.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/021-CompoundAssignmentWithAugmentedDivision.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/022-DeclareStringVariables.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/023-EscapingLiteralQuotesinStrings.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/024-QuotingStringswithSingleQuotes.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/025-EscapeSequencesinStrings.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/026-ConcatenatingStringswithPlusOperator.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/027-ConcatenatingStringswiththePlusEqualsOperator.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/028-ConstructingStringswithVariables.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/029-AppendingVariablestoStrings.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/01.Using-the-Test-Method_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/02.Match-Literal-Strings_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/03.Match-a-Literal-String-with-Different-Possibilities_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/04.Ignore-Case-While-Matching_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/05.Extract-Matches_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/06.Find-More-Than-the-First-Match_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/07.Match-with-Wildcard-Period_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/08.Match-Single-with-Multiple-Possibilities_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/09.Match-Letters-of-the-Alphabet_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/10.Match-Numbers-and-Letters-of-the-Alphabet_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/11.Match-Single-Characters-Not-Specified_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/12.Match-Characters-that-Occur-One-or-More-Times_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/13.Match-Characters-that-Occur-Zero-or-More-Times_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/14.Find-Characters-with-Lazy-Matching_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/15.Find-One-or-More-Criminals-in-a-Hunt_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/16.Match-Beginning-String-Patterns_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/17.Match-Ending-String-Patterns_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/18.Match-All-Letters-and-Numbers_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/20.Match-All-Numbers_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/21.Match-All-Non-Numbers_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/22.Restrict-Possible-Usernames_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/23.Match-Whitespace_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/24.Match-Non-Whitespace-Characters_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/25.Specify Upper-and-Lower-Number-of-Matches_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/26.Specify-Only-the-Lower-Number-of-Matches_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/27.Specify-Exact-Number-of-Matches_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/28.Check-for-All-or-None_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/29.Positive-and-Negative-Lookahead_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/30.Check-For-Mixed-Grouping-of-Characters_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/31.Reuse-Patterns-Using-Capture-Groups_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/32.Use-Capture-Groups-to-Search-and-Replace_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/33.Remove-Whitespace-from-Start-and-End_script.js (100%) rename {Regular-Expressions => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions}/Match Everything-But-Letters-and-Numbers_script.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/030-FindtheLengthofaString.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/031-UseBracketNotationtoFindtheFirstCharacterinaString.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/032-UnderstandStringImmutability.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/033-UseBracketNotationtoFindtheNthCharacterinaString.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/034-UseBracketNotationtoFindtheLastCharacterinaString.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/035-UseBracketNotationtoFindtheNth-to-LastCharacterinaString.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/036-WordBlanks.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/037-StoreMultipleValuesinoneVariableusingJavaScriptArrays.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/038-NestoneArraywithinAnotherArray.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/039-AccessArrayDatawithIndexes.js (100%) rename {Debugging => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging}/01.Use-the-JavaScript-Console-to-Check-the-Value-of-a-Variable_script.js (100%) rename {Debugging => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging}/02.Understanding-the-Differences-between-the-freeCodeCamp-and-Browser-Console_script.js (100%) rename {Debugging => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging}/03.Use-typeof-to-Check-the-Type-of-a-Variable_script.js (100%) rename {Debugging => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging}/04.Catch-Misspelled-Variable-and-Function-Names_script.js (100%) rename {Debugging => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging}/05.Catch-Unclosed-Parentheses-Brackets-Braces-and-Quotes_script.js (100%) rename {Debugging => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging}/06.Catch-Mixed-Usage-of-Single-and-Double-Quotes_script.js (100%) rename {Debugging => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging}/07.Catch-Use-of-Assignment-Operator-Instead-of-Equality-Operator_script.js (100%) rename {Debugging => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging}/08.Catch-Missing-Open-and-Closing-Parenthesis-After-a-Function-Call_script.js (100%) rename {Debugging => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging}/09.Catch-Arguments-Passed-in-the-Wrong-Order-When-Calling-a-Function_script.js (100%) rename {Debugging => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging}/10.Catch-Off-By-One-Errors-When-Using-Indexing_script.js (100%) rename {Debugging => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging}/11.Use-Caution-When-Reinitializing-Variables-Inside-a-Loop_script.js (100%) rename {Debugging => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging}/12.Prevent-Infinite-Loops-with-a-Valid-Terminal-Condition_script.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/040-ModifyArrayDataWithIndexes.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/041-AccessMulti-DimensionalArraysWithIndexes.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/042-ManipulateArraysWithpush().js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/043-ManipulateArraysWithpop().js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/044-ManipulateArraysWithshift().js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/045-ManipulateArraysWithunshift().js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/046-ShoppingList.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/047-WriteReusableJavaScriptwithFunctions.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/048-PassingValuestoFunctionswithArguments.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/049-GlobalScopeandFunctions.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/01.Use-an-Array-to-Store-a-Collection-of-Data_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/02.Access-an-Array-s-Using-Bracket-Notation_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/03.Add-Items-to-an-Array-with-push()-and-unshift()_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/04.Remove-Items-from-an-Array-with-pop()-and-shift()_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/05.Remove-Items-Using-splice()_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/06.Add-Items-Using-splice()_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/07.Copy-Array-Items-Using-slice()_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/08.Copy-an-Array-with-the-Spread-Operator_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/09.Combine-Arrays-with-the-Spread-Operator_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/10.Check-For-The-Presence-of-an-Element-With-indexOf()_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/11.Iterate-Through-All-an-Array's-Items-Using-For-Loops_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/12.Create-complex-multi-dimensional-arrays_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/13.Add-Key-Value-Pairs-to-JavaScript-Objects_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/14.Modify-an-Object-Nested-Within-an-Object_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/15.Access-Property-Names-with-Bracket-Notation_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/16.Use-the-delete-Keyword-to-Remove-Object-Properties_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/17.Check-if-an-Object-has-a-Property_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/18.Iterate-Through-the-Keys-of-an Object-with-a-for-in-Statement_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/19.Generate-an-Array-of-All-Object-Keys-with-Object.keys()_script.js (100%) rename {Basic-Data-Structures => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures}/20.Modify-an-Array-Stored-in-an-Object_script.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/050-LocalScopeandFunctions.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/051-Globalvs.LocalScopeinFunctions.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/052-ReturnaValuefromaFunctionwithReturn.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/053-UnderstandingUndefinedValuereturnedfromaFunction.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/054-AssignmentwithaReturnedValue.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/055-StandinLine.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/056-UnderstandingBooleanValues.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/057-UseConditionalLogicwithIfStatements.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/058-ComparisonwiththeEqualityOperator.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/059-ComparisonwiththeStrictEqualityOperator.js (100%) rename {Basic-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting}/01.Convert-Celsius-to-Fahrenheit_script.js (100%) rename {Basic-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting}/02.Reverse-a-String_script.js (100%) rename {Basic-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting}/03.Factorialize-a-Number_script.js (100%) rename {Basic-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting}/04.Find-the-Longest-Word-in-a-String_script.js (100%) rename {Basic-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting}/05.Return-Largest-Numbers-in-Arrays_script.js (100%) rename {Basic-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting}/06.Confirm-the-Ending_script.js (100%) rename {Basic-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting}/07.Repeat-a-String-Repeat-a-String_script.js (100%) rename {Basic-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting}/08.Truncate-a-String_script.js (100%) rename {Basic-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting}/09.Finders-Keepers_script.js (100%) rename {Basic-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting}/10.Boo-who_script.js (100%) rename {Basic-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting}/11.Title-Case-a-Sentence_script.js (100%) rename {Basic-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting}/12.Slice-and-Splice_script.js (100%) rename {Basic-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting}/13.Falsy-Bouncer_script.js (100%) rename {Basic-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting}/14.Where-do-I-Belong_script.js (100%) rename {Basic-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting}/15.Mutations_script.js (100%) rename {Basic-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting}/16.Chunky-Monkey_script.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/060-Practicecomparingdifferentvalues.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/061-ComparisonwiththeInequalityOperator.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/062-ComparisonwiththeStrictInequalityOperator.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/063-ComparisonwiththeGreaterThanOperator.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/064-ComparisonwiththeGreaterThanOrEqualToOperator.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/065-ComparisonwiththeLessThanOperator.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/066-ComparisonwiththeLessThanOrEqualToOperator.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/067-ComparisonswiththeLogicalAndOperator.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/068-ComparisonswiththeLogicalOrOperator.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/069-IntroducingElseStatements.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/01.Create-a-Basic-JavaScript-Object_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/02.Use-Dot-Notation-to-Access-the-Properties-of-an-Object_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/03.Create-a-Method-on-an-Object_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/04.Make-Code-More-Reusable-with-the-this-Keyword_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/05.Define-a-Constructor-Function_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/06.Use-a-Constructor-to-Create-Objects_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/07.Extend-Constructors-to-Receive-Arguments_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/08.Verify-an-Object's-Constructor-with-instanceof_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/09.Understand-Own-Properties_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/10.Use-Prototype-Properties-to-Reduce-Duplicate-Code_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/11.Iterate-Over-All-Properties_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/12.Understand-the-Constructor-Property_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/13.Change-the-Prototype-to-a-New-Object_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/14.Remember-to-Set-the-Constructor-Property-when-Changing-the-Prototype_script.js (100%) rename "Object-Oriented-Programming/15.Understand-Where-an-Object\342\200\231s-Prototype-Comes-From_script.js" => "JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/15.Understand-Where-an-Object\342\200\231s-Prototype-Comes-From_script.js" (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/16.Understand-the-Prototype-Chain_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/17.Use-Inheritance-So-You-Don't-Repeat-Yourself_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/18.Inherit-Behaviors-from-a-Supertype_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/19.Set-the-Child's-Prototype-to-an-Instance-of-the-Parent_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/20.Reset-an-Inherited-Constructor-Property_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/21.Add-Methods-After-Inheritance_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/22.Override-Inherited-Methods_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/23.Use-a-Mixin-to-Add-Common-Behavior-Between-Unrelated-Objects_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/24.Use-Closure-to-Protect-Properties-Within-an-Object-from-Being-Modified-Externally_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/25.Understand-the-Immediately-Invoked-Function-Expression-(IIFE)_script.js (100%) rename {Object-Oriented-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming}/26.Use-an-IIFE-to-Create-a-Module_script.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/070-IntroducingElseIfStatements.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/071-LogicalOrderinIfElseStatements.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/072-ChainingIfElseStatements.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/073-GolfCode.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/074-SelectingfromManyOptionswithSwitchStatements.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/075-AddingaDefaultOptioninSwitchStatements.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/076-MultipleIdenticalOptionsinSwitchStatements.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/077-ReplacingIfElseChainswithSwitch.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/078-ReturningBooleanValuesfromFunctions.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/079-ReturnEarlyPatternforFunctions.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/01.Learn-About-Functional-Programming.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/02.Understand-Functional-Programming-Terminology.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/03.Understand-the-Hazards-of-Using-Imperative-Code.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/04.Avoid-Mutations-and-Side-Effects-Using-Functional-Programming.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/05.Pass-Arguments-to-Avoid-External-Dependence-in-a-Function.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/06.Refactor-Global-Variables-Out-of-Functions.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/07.Use-the-map-Method-to-Extract-Data-from-an-Array.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/08.Implement-map-on-a-Prototype.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/09.Use-the-filter-Method-to-Extract-Data-from-an-Array.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/10.Implement-the-filter-Method-on-a-Prototype.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/11.Return-Part-of-an-Array-Using-the-slice-Method.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/12.Remove-Elements-from-an-Array-Using-slice-Instead-of-splice.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/13.Combine-Two-Arrays-Using-the-concat-Method.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/14.Add-Elements-to-the-End-of-an-Array-Using-concat-Instead-of-push.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/15.Use-the-reduce-Method-to-Analyze-Data.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/16.Use-Higher-Order-Functions-map-filter-or-reduce-to-Solve-a-Complex-Problem.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/17.Sort-an-Array-Alphabetically-using-the-sort-Method.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/18.Return-a-Sorted-Array-Without-Changing-the-Original-Array.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/19.Split-a-String-into-an-Array-Using-the-split-Method.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/20.Combine-an-Array-into-a-String-Using-the-join-Method.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/21.Apply-Functional-Programming-to-Convert-Strings-to-URL-Slugs.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/22.Use-the-every-Method-to-Check-that-Every-Element-in-an-Array-Meets-a-Criteria.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/23.Use-the-some-Method-to-Check-that-Any-Elements-in-an-Array-Meet-a-Criteria.js (100%) rename {Functional-Programming => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming}/24.Introduction-to-Currying-and-Partial-Application.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/080-CountingCards.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/081-BuildJavaScriptObjects.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/082-AccessingObjectPropertieswithDotNotation.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/083-AccessingObjectPropertieswithBracketNotation.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/084-AccessingObjectPropertieswithVariables.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/085-UpdatingObjectProperties.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/086-AddNewPropertiestoaJavaScriptObject.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/087-DeletePropertiesfromaJavaScriptObject.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/088-UsingObjectsforLookups.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/089-TestingObjectsforProperties.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/01.Sum-All-Numbers-in-a-Range.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/02.Diff-Two-Arrays.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/03.Seek-and-Destroy.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/04.Where-art-thou.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/05.Spinal-Tap-Case.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/06.Pig-Latin.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/07.Search-and-Replace.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/08.DNA-Pairing.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/09.Missing-letters.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/10.Sorted-Union.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/11.Convert-HTML-Entities.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/12.Sum-All-Odd-Fibonacci-Numbers.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/13.Sum-All-Primes.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/14.Smallest-Common-Multiple.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/15.Drop-it.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/16.Steamroller.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/17.Binary-Agents.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/18.Everything-Be-True.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/19.Arguments-Optional.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/20.Make-a-Person.js (100%) rename {Intermediate-Algorithm-Scripting => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting}/21.Map-the-Debris.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/090-ManipulatingComplexObjects.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/091-AccessingNestedObjects.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/092-AccessingNestedArrays.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/093-RecordCollection.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/094-IteratewithJavaScriptWhileLoops.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/095-IteratewithJavaScriptForLoops.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/096-IterateOddNumbersWithaForLoop.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/097-CountBackwardsWithaForLoop.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/098-IterateThroughanArraywithaForLoop.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/099-NestingForLoops.js (100%) rename {JavaScript-Algorithms-and-Data-Structures-Projects => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects}/Caesars-Cipher.js (100%) rename {JavaScript-Algorithms-and-Data-Structures-Projects => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects}/Cash-Register.js (100%) rename {JavaScript-Algorithms-and-Data-Structures-Projects => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects}/Palindrome-Checker.js (100%) rename {JavaScript-Algorithms-and-Data-Structures-Projects => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects}/Roman-Numeral-Converter.js (100%) rename {JavaScript-Algorithms-and-Data-Structures-Projects => JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects}/Telephone-Number-Validator.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/100-IteratewithJavaScriptDo...WhileLoops.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/101-ReplaceLoopsusingRecursion.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/102-ProfileLookup.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/103-GenerateRandomFractionswithJavaScript.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/104-GenerateRandomWholeNumberswithJavaScript.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/105-GenerateRandomWholeNumberswithinaRange.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/106-UsetheparseIntFunction.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/107-UsetheparseIntFunctionwithaRadix.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/108-UsetheConditional(Ternary)Operator.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/109-UsetheConditional(Ternary)Operator.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/110-UseRecursiontoCreateaCountdown.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/111-UseRecursiontoCreateaRangeofNumbers.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/112-DeclareaReadOnlyVariablewiththeconstKeyword.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/113-ExploreDifferencesBetweenthevarandletKeywords.js (100%) rename {Basic-JavaScript => JavaScript Algorithms and Data Structures/01-Basic-JavaScript}/rename.sh (100%) diff --git a/Basic-JavaScript/.DS_Store b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/.DS_Store similarity index 100% rename from Basic-JavaScript/.DS_Store rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/.DS_Store diff --git a/Basic-JavaScript/001-CommentYourJavaScriptCode.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/001-CommentYourJavaScriptCode.js similarity index 100% rename from Basic-JavaScript/001-CommentYourJavaScriptCode.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/001-CommentYourJavaScriptCode.js diff --git a/Basic-JavaScript/002-DeclareJavaScriptVariables.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/002-DeclareJavaScriptVariables.js similarity index 100% rename from Basic-JavaScript/002-DeclareJavaScriptVariables.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/002-DeclareJavaScriptVariables.js diff --git a/Basic-JavaScript/003-StoringValueswiththeAssignmentOperator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/003-StoringValueswiththeAssignmentOperator.js similarity index 100% rename from Basic-JavaScript/003-StoringValueswiththeAssignmentOperator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/003-StoringValueswiththeAssignmentOperator.js diff --git a/Basic-JavaScript/004-AssigningtheValueofOneVariabletoAnother.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/004-AssigningtheValueofOneVariabletoAnother.js similarity index 100% rename from Basic-JavaScript/004-AssigningtheValueofOneVariabletoAnother.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/004-AssigningtheValueofOneVariabletoAnother.js diff --git a/Basic-JavaScript/005-InitializingVariableswiththeAssignmentOperator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/005-InitializingVariableswiththeAssignmentOperator.js similarity index 100% rename from Basic-JavaScript/005-InitializingVariableswiththeAssignmentOperator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/005-InitializingVariableswiththeAssignmentOperator.js diff --git a/Basic-JavaScript/006-UnderstandingUninitializedVariables.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/006-UnderstandingUninitializedVariables.js similarity index 100% rename from Basic-JavaScript/006-UnderstandingUninitializedVariables.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/006-UnderstandingUninitializedVariables.js diff --git a/Basic-JavaScript/007-UnderstandingCaseSensitivityinVariables.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/007-UnderstandingCaseSensitivityinVariables.js similarity index 100% rename from Basic-JavaScript/007-UnderstandingCaseSensitivityinVariables.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/007-UnderstandingCaseSensitivityinVariables.js diff --git a/Basic-JavaScript/008-AddTwoNumberswithJavaScript.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/008-AddTwoNumberswithJavaScript.js similarity index 100% rename from Basic-JavaScript/008-AddTwoNumberswithJavaScript.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/008-AddTwoNumberswithJavaScript.js diff --git a/Basic-JavaScript/009-SubtractOneNumberfromAnotherwithJavaScript.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/009-SubtractOneNumberfromAnotherwithJavaScript.js similarity index 100% rename from Basic-JavaScript/009-SubtractOneNumberfromAnotherwithJavaScript.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/009-SubtractOneNumberfromAnotherwithJavaScript.js diff --git a/Basic-JavaScript/010-MultiplyTwoNumberswithJavaScript.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/010-MultiplyTwoNumberswithJavaScript.js similarity index 100% rename from Basic-JavaScript/010-MultiplyTwoNumberswithJavaScript.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/010-MultiplyTwoNumberswithJavaScript.js diff --git a/Basic-JavaScript/011-DivideOneNumberbyAnotherwithJavaScript.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/011-DivideOneNumberbyAnotherwithJavaScript.js similarity index 100% rename from Basic-JavaScript/011-DivideOneNumberbyAnotherwithJavaScript.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/011-DivideOneNumberbyAnotherwithJavaScript.js diff --git a/Basic-JavaScript/012-IncrementaNumberwithJavaScript.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/012-IncrementaNumberwithJavaScript.js similarity index 100% rename from Basic-JavaScript/012-IncrementaNumberwithJavaScript.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/012-IncrementaNumberwithJavaScript.js diff --git a/Basic-JavaScript/013-DecrementaNumberwithJavaScript.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/013-DecrementaNumberwithJavaScript.js similarity index 100% rename from Basic-JavaScript/013-DecrementaNumberwithJavaScript.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/013-DecrementaNumberwithJavaScript.js diff --git a/Basic-JavaScript/014-CreateDecimalNumberswithJavaScript.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/014-CreateDecimalNumberswithJavaScript.js similarity index 100% rename from Basic-JavaScript/014-CreateDecimalNumberswithJavaScript.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/014-CreateDecimalNumberswithJavaScript.js diff --git a/Basic-JavaScript/015-MultiplyTwoDecimalswithJavaScript.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/015-MultiplyTwoDecimalswithJavaScript.js similarity index 100% rename from Basic-JavaScript/015-MultiplyTwoDecimalswithJavaScript.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/015-MultiplyTwoDecimalswithJavaScript.js diff --git a/Basic-JavaScript/016-DivideOneDecimalbyAnotherwithJavaScript.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/016-DivideOneDecimalbyAnotherwithJavaScript.js similarity index 100% rename from Basic-JavaScript/016-DivideOneDecimalbyAnotherwithJavaScript.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/016-DivideOneDecimalbyAnotherwithJavaScript.js diff --git a/Basic-JavaScript/017-FindingaRemainderinJavaScript.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/017-FindingaRemainderinJavaScript.js similarity index 100% rename from Basic-JavaScript/017-FindingaRemainderinJavaScript.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/017-FindingaRemainderinJavaScript.js diff --git a/Basic-JavaScript/018-CompoundAssignmentWithAugmentedAddition.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/018-CompoundAssignmentWithAugmentedAddition.js similarity index 100% rename from Basic-JavaScript/018-CompoundAssignmentWithAugmentedAddition.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/018-CompoundAssignmentWithAugmentedAddition.js diff --git a/Basic-JavaScript/019-CompoundAssignmentWithAugmentedSubtraction.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/019-CompoundAssignmentWithAugmentedSubtraction.js similarity index 100% rename from Basic-JavaScript/019-CompoundAssignmentWithAugmentedSubtraction.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/019-CompoundAssignmentWithAugmentedSubtraction.js diff --git a/ES6/01.Compare-Scopes-of-the-var-and-let-Keywords_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/01.Compare-Scopes-of-the-var-and-let-Keywords_script.js similarity index 100% rename from ES6/01.Compare-Scopes-of-the-var-and-let-Keywords_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/01.Compare-Scopes-of-the-var-and-let-Keywords_script.js diff --git a/ES6/02.Mutate-an-Array-Declared-with-const_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/02.Mutate-an-Array-Declared-with-const_script.js similarity index 100% rename from ES6/02.Mutate-an-Array-Declared-with-const_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/02.Mutate-an-Array-Declared-with-const_script.js diff --git a/ES6/03.Prevent-Object-Mutation_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/03.Prevent-Object-Mutation_script.js similarity index 100% rename from ES6/03.Prevent-Object-Mutation_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/03.Prevent-Object-Mutation_script.js diff --git a/ES6/04.Use-Arrow-Functions-to-Write-Concise-Anonymous-Functions_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/04.Use-Arrow-Functions-to-Write-Concise-Anonymous-Functions_script.js similarity index 100% rename from ES6/04.Use-Arrow-Functions-to-Write-Concise-Anonymous-Functions_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/04.Use-Arrow-Functions-to-Write-Concise-Anonymous-Functions_script.js diff --git a/ES6/05.Write-Arrow-Functions-with-Parameters_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/05.Write-Arrow-Functions-with-Parameters_script.js similarity index 100% rename from ES6/05.Write-Arrow-Functions-with-Parameters_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/05.Write-Arrow-Functions-with-Parameters_script.js diff --git a/ES6/06.Set-Default-Parameters-for-Your-Functions_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/06.Set-Default-Parameters-for-Your-Functions_script.js similarity index 100% rename from ES6/06.Set-Default-Parameters-for-Your-Functions_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/06.Set-Default-Parameters-for-Your-Functions_script.js diff --git a/ES6/07.Use-the-Rest-Parameter-with-Function-Parameters_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/07.Use-the-Rest-Parameter-with-Function-Parameters_script.js similarity index 100% rename from ES6/07.Use-the-Rest-Parameter-with-Function-Parameters_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/07.Use-the-Rest-Parameter-with-Function-Parameters_script.js diff --git a/ES6/08.Use-the-Spread-Operator-to-Evaluate-Arrays-In-Place_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/08.Use-the-Spread-Operator-to-Evaluate-Arrays-In-Place_script.js similarity index 100% rename from ES6/08.Use-the-Spread-Operator-to-Evaluate-Arrays-In-Place_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/08.Use-the-Spread-Operator-to-Evaluate-Arrays-In-Place_script.js diff --git a/ES6/09.Use-Destructuring-Assignment-to-Extract-Values-from-Objects_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/09.Use-Destructuring-Assignment-to-Extract-Values-from-Objects_script.js similarity index 100% rename from ES6/09.Use-Destructuring-Assignment-to-Extract-Values-from-Objects_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/09.Use-Destructuring-Assignment-to-Extract-Values-from-Objects_script.js diff --git a/ES6/10.Use-Destructuring-Assignment-to-Assign-Variables-from-Objects_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/10.Use-Destructuring-Assignment-to-Assign-Variables-from-Objects_script.js similarity index 100% rename from ES6/10.Use-Destructuring-Assignment-to-Assign-Variables-from-Objects_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/10.Use-Destructuring-Assignment-to-Assign-Variables-from-Objects_script.js diff --git a/ES6/11.Use-Destructuring-Assignment to-Assign-Variables-from-Nested-Objects_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/11.Use-Destructuring-Assignment to-Assign-Variables-from-Nested-Objects_script.js similarity index 100% rename from ES6/11.Use-Destructuring-Assignment to-Assign-Variables-from-Nested-Objects_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/11.Use-Destructuring-Assignment to-Assign-Variables-from-Nested-Objects_script.js diff --git a/ES6/12.Use-Destructuring-Assignment-to-Assign-Variables-from-Arrays_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/12.Use-Destructuring-Assignment-to-Assign-Variables-from-Arrays_script.js similarity index 100% rename from ES6/12.Use-Destructuring-Assignment-to-Assign-Variables-from-Arrays_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/12.Use-Destructuring-Assignment-to-Assign-Variables-from-Arrays_script.js diff --git a/ES6/13.Use-Destructuring-Assignment-with-the-Rest-Parameter-to-Reassign-Array-Elements_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/13.Use-Destructuring-Assignment-with-the-Rest-Parameter-to-Reassign-Array-Elements_script.js similarity index 100% rename from ES6/13.Use-Destructuring-Assignment-with-the-Rest-Parameter-to-Reassign-Array-Elements_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/13.Use-Destructuring-Assignment-with-the-Rest-Parameter-to-Reassign-Array-Elements_script.js diff --git a/ES6/14.Use-Destructuring-Assignment-to-Pass-an-Object-as-a-Function's-Parameters_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/14.Use-Destructuring-Assignment-to-Pass-an-Object-as-a-Function's-Parameters_script.js similarity index 100% rename from ES6/14.Use-Destructuring-Assignment-to-Pass-an-Object-as-a-Function's-Parameters_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/14.Use-Destructuring-Assignment-to-Pass-an-Object-as-a-Function's-Parameters_script.js diff --git a/ES6/15.Create-Strings-using-Template-Literals_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/15.Create-Strings-using-Template-Literals_script.js similarity index 100% rename from ES6/15.Create-Strings-using-Template-Literals_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/15.Create-Strings-using-Template-Literals_script.js diff --git a/ES6/16.Write-Concise-Object-Literal-Declarations-Using-Object-Property-Shorthand_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/16.Write-Concise-Object-Literal-Declarations-Using-Object-Property-Shorthand_script.js similarity index 100% rename from ES6/16.Write-Concise-Object-Literal-Declarations-Using-Object-Property-Shorthand_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/16.Write-Concise-Object-Literal-Declarations-Using-Object-Property-Shorthand_script.js diff --git a/ES6/17.Write-Concise-Declarative-Functions-with-ES6_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/17.Write-Concise-Declarative-Functions-with-ES6_script.js similarity index 100% rename from ES6/17.Write-Concise-Declarative-Functions-with-ES6_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/17.Write-Concise-Declarative-Functions-with-ES6_script.js diff --git a/ES6/18.Use-class-Syntax-to-Define-a-Constructor-Function_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/18.Use-class-Syntax-to-Define-a-Constructor-Function_script.js similarity index 100% rename from ES6/18.Use-class-Syntax-to-Define-a-Constructor-Function_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/18.Use-class-Syntax-to-Define-a-Constructor-Function_script.js diff --git a/ES6/19.Use-getters-and-setters-to-Control-Access-to-an-Object_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/19.Use-getters-and-setters-to-Control-Access-to-an-Object_script.js similarity index 100% rename from ES6/19.Use-getters-and-setters-to-Control-Access-to-an-Object_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/19.Use-getters-and-setters-to-Control-Access-to-an-Object_script.js diff --git a/ES6/20.Create-a-Module-Script_index.html b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/20.Create-a-Module-Script_index.html similarity index 100% rename from ES6/20.Create-a-Module-Script_index.html rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/20.Create-a-Module-Script_index.html diff --git a/ES6/21.Use-export-to-Share-a-Code-Block_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/21.Use-export-to-Share-a-Code-Block_script.js similarity index 100% rename from ES6/21.Use-export-to-Share-a-Code-Block_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/21.Use-export-to-Share-a-Code-Block_script.js diff --git a/ES6/22.Reuse-JavaScript-Code-Using-import_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/22.Reuse-JavaScript-Code-Using-import_script.js similarity index 100% rename from ES6/22.Reuse-JavaScript-Code-Using-import_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/22.Reuse-JavaScript-Code-Using-import_script.js diff --git a/ES6/23.Use-to-Import-Everything-from-a-File_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/23.Use-to-Import-Everything-from-a-File_script.js similarity index 100% rename from ES6/23.Use-to-Import-Everything-from-a-File_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/23.Use-to-Import-Everything-from-a-File_script.js diff --git a/ES6/24.Create-an-Export-Fallback-with-export-default_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/24.Create-an-Export-Fallback-with-export-default_script.js similarity index 100% rename from ES6/24.Create-an-Export-Fallback-with-export-default_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/24.Create-an-Export-Fallback-with-export-default_script.js diff --git a/ES6/25.Import-a-Default-Export_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/25.Import-a-Default-Export_script.js similarity index 100% rename from ES6/25.Import-a-Default-Export_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/25.Import-a-Default-Export_script.js diff --git a/ES6/26.Create-a-JavaScript-Promise_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/26.Create-a-JavaScript-Promise_script.js similarity index 100% rename from ES6/26.Create-a-JavaScript-Promise_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/26.Create-a-JavaScript-Promise_script.js diff --git a/ES6/27.Complete-a-Promise-with-resolve-and-reject_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/27.Complete-a-Promise-with-resolve-and-reject_script.js similarity index 100% rename from ES6/27.Complete-a-Promise-with-resolve-and-reject_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/27.Complete-a-Promise-with-resolve-and-reject_script.js diff --git a/ES6/28.Handle-a-Fulfilled-Promise-with-then_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/28.Handle-a-Fulfilled-Promise-with-then_script.js similarity index 100% rename from ES6/28.Handle-a-Fulfilled-Promise-with-then_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/28.Handle-a-Fulfilled-Promise-with-then_script.js diff --git a/ES6/29.Handle-a-Rejected-Promise-with-catch_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/29.Handle-a-Rejected-Promise-with-catch_script.js similarity index 100% rename from ES6/29.Handle-a-Rejected-Promise-with-catch_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/29.Handle-a-Rejected-Promise-with-catch_script.js diff --git a/ES6/moverenamefile.sh b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/moverenamefile.sh similarity index 100% rename from ES6/moverenamefile.sh rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/moverenamefile.sh diff --git a/Basic-JavaScript/020-CompoundAssignmentWithAugmentedMultiplication.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/020-CompoundAssignmentWithAugmentedMultiplication.js similarity index 100% rename from Basic-JavaScript/020-CompoundAssignmentWithAugmentedMultiplication.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/020-CompoundAssignmentWithAugmentedMultiplication.js diff --git a/Basic-JavaScript/021-CompoundAssignmentWithAugmentedDivision.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/021-CompoundAssignmentWithAugmentedDivision.js similarity index 100% rename from Basic-JavaScript/021-CompoundAssignmentWithAugmentedDivision.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/021-CompoundAssignmentWithAugmentedDivision.js diff --git a/Basic-JavaScript/022-DeclareStringVariables.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/022-DeclareStringVariables.js similarity index 100% rename from Basic-JavaScript/022-DeclareStringVariables.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/022-DeclareStringVariables.js diff --git a/Basic-JavaScript/023-EscapingLiteralQuotesinStrings.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/023-EscapingLiteralQuotesinStrings.js similarity index 100% rename from Basic-JavaScript/023-EscapingLiteralQuotesinStrings.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/023-EscapingLiteralQuotesinStrings.js diff --git a/Basic-JavaScript/024-QuotingStringswithSingleQuotes.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/024-QuotingStringswithSingleQuotes.js similarity index 100% rename from Basic-JavaScript/024-QuotingStringswithSingleQuotes.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/024-QuotingStringswithSingleQuotes.js diff --git a/Basic-JavaScript/025-EscapeSequencesinStrings.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/025-EscapeSequencesinStrings.js similarity index 100% rename from Basic-JavaScript/025-EscapeSequencesinStrings.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/025-EscapeSequencesinStrings.js diff --git a/Basic-JavaScript/026-ConcatenatingStringswithPlusOperator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/026-ConcatenatingStringswithPlusOperator.js similarity index 100% rename from Basic-JavaScript/026-ConcatenatingStringswithPlusOperator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/026-ConcatenatingStringswithPlusOperator.js diff --git a/Basic-JavaScript/027-ConcatenatingStringswiththePlusEqualsOperator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/027-ConcatenatingStringswiththePlusEqualsOperator.js similarity index 100% rename from Basic-JavaScript/027-ConcatenatingStringswiththePlusEqualsOperator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/027-ConcatenatingStringswiththePlusEqualsOperator.js diff --git a/Basic-JavaScript/028-ConstructingStringswithVariables.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/028-ConstructingStringswithVariables.js similarity index 100% rename from Basic-JavaScript/028-ConstructingStringswithVariables.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/028-ConstructingStringswithVariables.js diff --git a/Basic-JavaScript/029-AppendingVariablestoStrings.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/029-AppendingVariablestoStrings.js similarity index 100% rename from Basic-JavaScript/029-AppendingVariablestoStrings.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/029-AppendingVariablestoStrings.js diff --git a/Regular-Expressions/01.Using-the-Test-Method_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/01.Using-the-Test-Method_script.js similarity index 100% rename from Regular-Expressions/01.Using-the-Test-Method_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/01.Using-the-Test-Method_script.js diff --git a/Regular-Expressions/02.Match-Literal-Strings_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/02.Match-Literal-Strings_script.js similarity index 100% rename from Regular-Expressions/02.Match-Literal-Strings_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/02.Match-Literal-Strings_script.js diff --git a/Regular-Expressions/03.Match-a-Literal-String-with-Different-Possibilities_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/03.Match-a-Literal-String-with-Different-Possibilities_script.js similarity index 100% rename from Regular-Expressions/03.Match-a-Literal-String-with-Different-Possibilities_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/03.Match-a-Literal-String-with-Different-Possibilities_script.js diff --git a/Regular-Expressions/04.Ignore-Case-While-Matching_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/04.Ignore-Case-While-Matching_script.js similarity index 100% rename from Regular-Expressions/04.Ignore-Case-While-Matching_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/04.Ignore-Case-While-Matching_script.js diff --git a/Regular-Expressions/05.Extract-Matches_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/05.Extract-Matches_script.js similarity index 100% rename from Regular-Expressions/05.Extract-Matches_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/05.Extract-Matches_script.js diff --git a/Regular-Expressions/06.Find-More-Than-the-First-Match_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/06.Find-More-Than-the-First-Match_script.js similarity index 100% rename from Regular-Expressions/06.Find-More-Than-the-First-Match_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/06.Find-More-Than-the-First-Match_script.js diff --git a/Regular-Expressions/07.Match-with-Wildcard-Period_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/07.Match-with-Wildcard-Period_script.js similarity index 100% rename from Regular-Expressions/07.Match-with-Wildcard-Period_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/07.Match-with-Wildcard-Period_script.js diff --git a/Regular-Expressions/08.Match-Single-with-Multiple-Possibilities_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/08.Match-Single-with-Multiple-Possibilities_script.js similarity index 100% rename from Regular-Expressions/08.Match-Single-with-Multiple-Possibilities_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/08.Match-Single-with-Multiple-Possibilities_script.js diff --git a/Regular-Expressions/09.Match-Letters-of-the-Alphabet_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/09.Match-Letters-of-the-Alphabet_script.js similarity index 100% rename from Regular-Expressions/09.Match-Letters-of-the-Alphabet_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/09.Match-Letters-of-the-Alphabet_script.js diff --git a/Regular-Expressions/10.Match-Numbers-and-Letters-of-the-Alphabet_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/10.Match-Numbers-and-Letters-of-the-Alphabet_script.js similarity index 100% rename from Regular-Expressions/10.Match-Numbers-and-Letters-of-the-Alphabet_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/10.Match-Numbers-and-Letters-of-the-Alphabet_script.js diff --git a/Regular-Expressions/11.Match-Single-Characters-Not-Specified_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/11.Match-Single-Characters-Not-Specified_script.js similarity index 100% rename from Regular-Expressions/11.Match-Single-Characters-Not-Specified_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/11.Match-Single-Characters-Not-Specified_script.js diff --git a/Regular-Expressions/12.Match-Characters-that-Occur-One-or-More-Times_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/12.Match-Characters-that-Occur-One-or-More-Times_script.js similarity index 100% rename from Regular-Expressions/12.Match-Characters-that-Occur-One-or-More-Times_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/12.Match-Characters-that-Occur-One-or-More-Times_script.js diff --git a/Regular-Expressions/13.Match-Characters-that-Occur-Zero-or-More-Times_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/13.Match-Characters-that-Occur-Zero-or-More-Times_script.js similarity index 100% rename from Regular-Expressions/13.Match-Characters-that-Occur-Zero-or-More-Times_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/13.Match-Characters-that-Occur-Zero-or-More-Times_script.js diff --git a/Regular-Expressions/14.Find-Characters-with-Lazy-Matching_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/14.Find-Characters-with-Lazy-Matching_script.js similarity index 100% rename from Regular-Expressions/14.Find-Characters-with-Lazy-Matching_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/14.Find-Characters-with-Lazy-Matching_script.js diff --git a/Regular-Expressions/15.Find-One-or-More-Criminals-in-a-Hunt_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/15.Find-One-or-More-Criminals-in-a-Hunt_script.js similarity index 100% rename from Regular-Expressions/15.Find-One-or-More-Criminals-in-a-Hunt_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/15.Find-One-or-More-Criminals-in-a-Hunt_script.js diff --git a/Regular-Expressions/16.Match-Beginning-String-Patterns_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/16.Match-Beginning-String-Patterns_script.js similarity index 100% rename from Regular-Expressions/16.Match-Beginning-String-Patterns_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/16.Match-Beginning-String-Patterns_script.js diff --git a/Regular-Expressions/17.Match-Ending-String-Patterns_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/17.Match-Ending-String-Patterns_script.js similarity index 100% rename from Regular-Expressions/17.Match-Ending-String-Patterns_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/17.Match-Ending-String-Patterns_script.js diff --git a/Regular-Expressions/18.Match-All-Letters-and-Numbers_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/18.Match-All-Letters-and-Numbers_script.js similarity index 100% rename from Regular-Expressions/18.Match-All-Letters-and-Numbers_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/18.Match-All-Letters-and-Numbers_script.js diff --git a/Regular-Expressions/20.Match-All-Numbers_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/20.Match-All-Numbers_script.js similarity index 100% rename from Regular-Expressions/20.Match-All-Numbers_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/20.Match-All-Numbers_script.js diff --git a/Regular-Expressions/21.Match-All-Non-Numbers_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/21.Match-All-Non-Numbers_script.js similarity index 100% rename from Regular-Expressions/21.Match-All-Non-Numbers_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/21.Match-All-Non-Numbers_script.js diff --git a/Regular-Expressions/22.Restrict-Possible-Usernames_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/22.Restrict-Possible-Usernames_script.js similarity index 100% rename from Regular-Expressions/22.Restrict-Possible-Usernames_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/22.Restrict-Possible-Usernames_script.js diff --git a/Regular-Expressions/23.Match-Whitespace_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/23.Match-Whitespace_script.js similarity index 100% rename from Regular-Expressions/23.Match-Whitespace_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/23.Match-Whitespace_script.js diff --git a/Regular-Expressions/24.Match-Non-Whitespace-Characters_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/24.Match-Non-Whitespace-Characters_script.js similarity index 100% rename from Regular-Expressions/24.Match-Non-Whitespace-Characters_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/24.Match-Non-Whitespace-Characters_script.js diff --git a/Regular-Expressions/25.Specify Upper-and-Lower-Number-of-Matches_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/25.Specify Upper-and-Lower-Number-of-Matches_script.js similarity index 100% rename from Regular-Expressions/25.Specify Upper-and-Lower-Number-of-Matches_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/25.Specify Upper-and-Lower-Number-of-Matches_script.js diff --git a/Regular-Expressions/26.Specify-Only-the-Lower-Number-of-Matches_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/26.Specify-Only-the-Lower-Number-of-Matches_script.js similarity index 100% rename from Regular-Expressions/26.Specify-Only-the-Lower-Number-of-Matches_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/26.Specify-Only-the-Lower-Number-of-Matches_script.js diff --git a/Regular-Expressions/27.Specify-Exact-Number-of-Matches_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/27.Specify-Exact-Number-of-Matches_script.js similarity index 100% rename from Regular-Expressions/27.Specify-Exact-Number-of-Matches_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/27.Specify-Exact-Number-of-Matches_script.js diff --git a/Regular-Expressions/28.Check-for-All-or-None_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/28.Check-for-All-or-None_script.js similarity index 100% rename from Regular-Expressions/28.Check-for-All-or-None_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/28.Check-for-All-or-None_script.js diff --git a/Regular-Expressions/29.Positive-and-Negative-Lookahead_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/29.Positive-and-Negative-Lookahead_script.js similarity index 100% rename from Regular-Expressions/29.Positive-and-Negative-Lookahead_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/29.Positive-and-Negative-Lookahead_script.js diff --git a/Regular-Expressions/30.Check-For-Mixed-Grouping-of-Characters_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/30.Check-For-Mixed-Grouping-of-Characters_script.js similarity index 100% rename from Regular-Expressions/30.Check-For-Mixed-Grouping-of-Characters_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/30.Check-For-Mixed-Grouping-of-Characters_script.js diff --git a/Regular-Expressions/31.Reuse-Patterns-Using-Capture-Groups_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/31.Reuse-Patterns-Using-Capture-Groups_script.js similarity index 100% rename from Regular-Expressions/31.Reuse-Patterns-Using-Capture-Groups_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/31.Reuse-Patterns-Using-Capture-Groups_script.js diff --git a/Regular-Expressions/32.Use-Capture-Groups-to-Search-and-Replace_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/32.Use-Capture-Groups-to-Search-and-Replace_script.js similarity index 100% rename from Regular-Expressions/32.Use-Capture-Groups-to-Search-and-Replace_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/32.Use-Capture-Groups-to-Search-and-Replace_script.js diff --git a/Regular-Expressions/33.Remove-Whitespace-from-Start-and-End_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/33.Remove-Whitespace-from-Start-and-End_script.js similarity index 100% rename from Regular-Expressions/33.Remove-Whitespace-from-Start-and-End_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/33.Remove-Whitespace-from-Start-and-End_script.js diff --git a/Regular-Expressions/Match Everything-But-Letters-and-Numbers_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/Match Everything-But-Letters-and-Numbers_script.js similarity index 100% rename from Regular-Expressions/Match Everything-But-Letters-and-Numbers_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/Match Everything-But-Letters-and-Numbers_script.js diff --git a/Basic-JavaScript/030-FindtheLengthofaString.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/030-FindtheLengthofaString.js similarity index 100% rename from Basic-JavaScript/030-FindtheLengthofaString.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/030-FindtheLengthofaString.js diff --git a/Basic-JavaScript/031-UseBracketNotationtoFindtheFirstCharacterinaString.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/031-UseBracketNotationtoFindtheFirstCharacterinaString.js similarity index 100% rename from Basic-JavaScript/031-UseBracketNotationtoFindtheFirstCharacterinaString.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/031-UseBracketNotationtoFindtheFirstCharacterinaString.js diff --git a/Basic-JavaScript/032-UnderstandStringImmutability.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/032-UnderstandStringImmutability.js similarity index 100% rename from Basic-JavaScript/032-UnderstandStringImmutability.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/032-UnderstandStringImmutability.js diff --git a/Basic-JavaScript/033-UseBracketNotationtoFindtheNthCharacterinaString.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/033-UseBracketNotationtoFindtheNthCharacterinaString.js similarity index 100% rename from Basic-JavaScript/033-UseBracketNotationtoFindtheNthCharacterinaString.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/033-UseBracketNotationtoFindtheNthCharacterinaString.js diff --git a/Basic-JavaScript/034-UseBracketNotationtoFindtheLastCharacterinaString.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/034-UseBracketNotationtoFindtheLastCharacterinaString.js similarity index 100% rename from Basic-JavaScript/034-UseBracketNotationtoFindtheLastCharacterinaString.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/034-UseBracketNotationtoFindtheLastCharacterinaString.js diff --git a/Basic-JavaScript/035-UseBracketNotationtoFindtheNth-to-LastCharacterinaString.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/035-UseBracketNotationtoFindtheNth-to-LastCharacterinaString.js similarity index 100% rename from Basic-JavaScript/035-UseBracketNotationtoFindtheNth-to-LastCharacterinaString.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/035-UseBracketNotationtoFindtheNth-to-LastCharacterinaString.js diff --git a/Basic-JavaScript/036-WordBlanks.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/036-WordBlanks.js similarity index 100% rename from Basic-JavaScript/036-WordBlanks.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/036-WordBlanks.js diff --git a/Basic-JavaScript/037-StoreMultipleValuesinoneVariableusingJavaScriptArrays.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/037-StoreMultipleValuesinoneVariableusingJavaScriptArrays.js similarity index 100% rename from Basic-JavaScript/037-StoreMultipleValuesinoneVariableusingJavaScriptArrays.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/037-StoreMultipleValuesinoneVariableusingJavaScriptArrays.js diff --git a/Basic-JavaScript/038-NestoneArraywithinAnotherArray.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/038-NestoneArraywithinAnotherArray.js similarity index 100% rename from Basic-JavaScript/038-NestoneArraywithinAnotherArray.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/038-NestoneArraywithinAnotherArray.js diff --git a/Basic-JavaScript/039-AccessArrayDatawithIndexes.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/039-AccessArrayDatawithIndexes.js similarity index 100% rename from Basic-JavaScript/039-AccessArrayDatawithIndexes.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/039-AccessArrayDatawithIndexes.js diff --git a/Debugging/01.Use-the-JavaScript-Console-to-Check-the-Value-of-a-Variable_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/01.Use-the-JavaScript-Console-to-Check-the-Value-of-a-Variable_script.js similarity index 100% rename from Debugging/01.Use-the-JavaScript-Console-to-Check-the-Value-of-a-Variable_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/01.Use-the-JavaScript-Console-to-Check-the-Value-of-a-Variable_script.js diff --git a/Debugging/02.Understanding-the-Differences-between-the-freeCodeCamp-and-Browser-Console_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/02.Understanding-the-Differences-between-the-freeCodeCamp-and-Browser-Console_script.js similarity index 100% rename from Debugging/02.Understanding-the-Differences-between-the-freeCodeCamp-and-Browser-Console_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/02.Understanding-the-Differences-between-the-freeCodeCamp-and-Browser-Console_script.js diff --git a/Debugging/03.Use-typeof-to-Check-the-Type-of-a-Variable_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/03.Use-typeof-to-Check-the-Type-of-a-Variable_script.js similarity index 100% rename from Debugging/03.Use-typeof-to-Check-the-Type-of-a-Variable_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/03.Use-typeof-to-Check-the-Type-of-a-Variable_script.js diff --git a/Debugging/04.Catch-Misspelled-Variable-and-Function-Names_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/04.Catch-Misspelled-Variable-and-Function-Names_script.js similarity index 100% rename from Debugging/04.Catch-Misspelled-Variable-and-Function-Names_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/04.Catch-Misspelled-Variable-and-Function-Names_script.js diff --git a/Debugging/05.Catch-Unclosed-Parentheses-Brackets-Braces-and-Quotes_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/05.Catch-Unclosed-Parentheses-Brackets-Braces-and-Quotes_script.js similarity index 100% rename from Debugging/05.Catch-Unclosed-Parentheses-Brackets-Braces-and-Quotes_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/05.Catch-Unclosed-Parentheses-Brackets-Braces-and-Quotes_script.js diff --git a/Debugging/06.Catch-Mixed-Usage-of-Single-and-Double-Quotes_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/06.Catch-Mixed-Usage-of-Single-and-Double-Quotes_script.js similarity index 100% rename from Debugging/06.Catch-Mixed-Usage-of-Single-and-Double-Quotes_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/06.Catch-Mixed-Usage-of-Single-and-Double-Quotes_script.js diff --git a/Debugging/07.Catch-Use-of-Assignment-Operator-Instead-of-Equality-Operator_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/07.Catch-Use-of-Assignment-Operator-Instead-of-Equality-Operator_script.js similarity index 100% rename from Debugging/07.Catch-Use-of-Assignment-Operator-Instead-of-Equality-Operator_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/07.Catch-Use-of-Assignment-Operator-Instead-of-Equality-Operator_script.js diff --git a/Debugging/08.Catch-Missing-Open-and-Closing-Parenthesis-After-a-Function-Call_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/08.Catch-Missing-Open-and-Closing-Parenthesis-After-a-Function-Call_script.js similarity index 100% rename from Debugging/08.Catch-Missing-Open-and-Closing-Parenthesis-After-a-Function-Call_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/08.Catch-Missing-Open-and-Closing-Parenthesis-After-a-Function-Call_script.js diff --git a/Debugging/09.Catch-Arguments-Passed-in-the-Wrong-Order-When-Calling-a-Function_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/09.Catch-Arguments-Passed-in-the-Wrong-Order-When-Calling-a-Function_script.js similarity index 100% rename from Debugging/09.Catch-Arguments-Passed-in-the-Wrong-Order-When-Calling-a-Function_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/09.Catch-Arguments-Passed-in-the-Wrong-Order-When-Calling-a-Function_script.js diff --git a/Debugging/10.Catch-Off-By-One-Errors-When-Using-Indexing_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/10.Catch-Off-By-One-Errors-When-Using-Indexing_script.js similarity index 100% rename from Debugging/10.Catch-Off-By-One-Errors-When-Using-Indexing_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/10.Catch-Off-By-One-Errors-When-Using-Indexing_script.js diff --git a/Debugging/11.Use-Caution-When-Reinitializing-Variables-Inside-a-Loop_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/11.Use-Caution-When-Reinitializing-Variables-Inside-a-Loop_script.js similarity index 100% rename from Debugging/11.Use-Caution-When-Reinitializing-Variables-Inside-a-Loop_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/11.Use-Caution-When-Reinitializing-Variables-Inside-a-Loop_script.js diff --git a/Debugging/12.Prevent-Infinite-Loops-with-a-Valid-Terminal-Condition_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/12.Prevent-Infinite-Loops-with-a-Valid-Terminal-Condition_script.js similarity index 100% rename from Debugging/12.Prevent-Infinite-Loops-with-a-Valid-Terminal-Condition_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/12.Prevent-Infinite-Loops-with-a-Valid-Terminal-Condition_script.js diff --git a/Basic-JavaScript/040-ModifyArrayDataWithIndexes.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/040-ModifyArrayDataWithIndexes.js similarity index 100% rename from Basic-JavaScript/040-ModifyArrayDataWithIndexes.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/040-ModifyArrayDataWithIndexes.js diff --git a/Basic-JavaScript/041-AccessMulti-DimensionalArraysWithIndexes.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/041-AccessMulti-DimensionalArraysWithIndexes.js similarity index 100% rename from Basic-JavaScript/041-AccessMulti-DimensionalArraysWithIndexes.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/041-AccessMulti-DimensionalArraysWithIndexes.js diff --git a/Basic-JavaScript/042-ManipulateArraysWithpush().js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/042-ManipulateArraysWithpush().js similarity index 100% rename from Basic-JavaScript/042-ManipulateArraysWithpush().js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/042-ManipulateArraysWithpush().js diff --git a/Basic-JavaScript/043-ManipulateArraysWithpop().js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/043-ManipulateArraysWithpop().js similarity index 100% rename from Basic-JavaScript/043-ManipulateArraysWithpop().js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/043-ManipulateArraysWithpop().js diff --git a/Basic-JavaScript/044-ManipulateArraysWithshift().js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/044-ManipulateArraysWithshift().js similarity index 100% rename from Basic-JavaScript/044-ManipulateArraysWithshift().js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/044-ManipulateArraysWithshift().js diff --git a/Basic-JavaScript/045-ManipulateArraysWithunshift().js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/045-ManipulateArraysWithunshift().js similarity index 100% rename from Basic-JavaScript/045-ManipulateArraysWithunshift().js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/045-ManipulateArraysWithunshift().js diff --git a/Basic-JavaScript/046-ShoppingList.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/046-ShoppingList.js similarity index 100% rename from Basic-JavaScript/046-ShoppingList.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/046-ShoppingList.js diff --git a/Basic-JavaScript/047-WriteReusableJavaScriptwithFunctions.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/047-WriteReusableJavaScriptwithFunctions.js similarity index 100% rename from Basic-JavaScript/047-WriteReusableJavaScriptwithFunctions.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/047-WriteReusableJavaScriptwithFunctions.js diff --git a/Basic-JavaScript/048-PassingValuestoFunctionswithArguments.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/048-PassingValuestoFunctionswithArguments.js similarity index 100% rename from Basic-JavaScript/048-PassingValuestoFunctionswithArguments.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/048-PassingValuestoFunctionswithArguments.js diff --git a/Basic-JavaScript/049-GlobalScopeandFunctions.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/049-GlobalScopeandFunctions.js similarity index 100% rename from Basic-JavaScript/049-GlobalScopeandFunctions.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/049-GlobalScopeandFunctions.js diff --git a/Basic-Data-Structures/01.Use-an-Array-to-Store-a-Collection-of-Data_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/01.Use-an-Array-to-Store-a-Collection-of-Data_script.js similarity index 100% rename from Basic-Data-Structures/01.Use-an-Array-to-Store-a-Collection-of-Data_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/01.Use-an-Array-to-Store-a-Collection-of-Data_script.js diff --git a/Basic-Data-Structures/02.Access-an-Array-s-Using-Bracket-Notation_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/02.Access-an-Array-s-Using-Bracket-Notation_script.js similarity index 100% rename from Basic-Data-Structures/02.Access-an-Array-s-Using-Bracket-Notation_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/02.Access-an-Array-s-Using-Bracket-Notation_script.js diff --git a/Basic-Data-Structures/03.Add-Items-to-an-Array-with-push()-and-unshift()_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/03.Add-Items-to-an-Array-with-push()-and-unshift()_script.js similarity index 100% rename from Basic-Data-Structures/03.Add-Items-to-an-Array-with-push()-and-unshift()_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/03.Add-Items-to-an-Array-with-push()-and-unshift()_script.js diff --git a/Basic-Data-Structures/04.Remove-Items-from-an-Array-with-pop()-and-shift()_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/04.Remove-Items-from-an-Array-with-pop()-and-shift()_script.js similarity index 100% rename from Basic-Data-Structures/04.Remove-Items-from-an-Array-with-pop()-and-shift()_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/04.Remove-Items-from-an-Array-with-pop()-and-shift()_script.js diff --git a/Basic-Data-Structures/05.Remove-Items-Using-splice()_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/05.Remove-Items-Using-splice()_script.js similarity index 100% rename from Basic-Data-Structures/05.Remove-Items-Using-splice()_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/05.Remove-Items-Using-splice()_script.js diff --git a/Basic-Data-Structures/06.Add-Items-Using-splice()_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/06.Add-Items-Using-splice()_script.js similarity index 100% rename from Basic-Data-Structures/06.Add-Items-Using-splice()_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/06.Add-Items-Using-splice()_script.js diff --git a/Basic-Data-Structures/07.Copy-Array-Items-Using-slice()_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/07.Copy-Array-Items-Using-slice()_script.js similarity index 100% rename from Basic-Data-Structures/07.Copy-Array-Items-Using-slice()_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/07.Copy-Array-Items-Using-slice()_script.js diff --git a/Basic-Data-Structures/08.Copy-an-Array-with-the-Spread-Operator_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/08.Copy-an-Array-with-the-Spread-Operator_script.js similarity index 100% rename from Basic-Data-Structures/08.Copy-an-Array-with-the-Spread-Operator_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/08.Copy-an-Array-with-the-Spread-Operator_script.js diff --git a/Basic-Data-Structures/09.Combine-Arrays-with-the-Spread-Operator_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/09.Combine-Arrays-with-the-Spread-Operator_script.js similarity index 100% rename from Basic-Data-Structures/09.Combine-Arrays-with-the-Spread-Operator_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/09.Combine-Arrays-with-the-Spread-Operator_script.js diff --git a/Basic-Data-Structures/10.Check-For-The-Presence-of-an-Element-With-indexOf()_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/10.Check-For-The-Presence-of-an-Element-With-indexOf()_script.js similarity index 100% rename from Basic-Data-Structures/10.Check-For-The-Presence-of-an-Element-With-indexOf()_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/10.Check-For-The-Presence-of-an-Element-With-indexOf()_script.js diff --git a/Basic-Data-Structures/11.Iterate-Through-All-an-Array's-Items-Using-For-Loops_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/11.Iterate-Through-All-an-Array's-Items-Using-For-Loops_script.js similarity index 100% rename from Basic-Data-Structures/11.Iterate-Through-All-an-Array's-Items-Using-For-Loops_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/11.Iterate-Through-All-an-Array's-Items-Using-For-Loops_script.js diff --git a/Basic-Data-Structures/12.Create-complex-multi-dimensional-arrays_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/12.Create-complex-multi-dimensional-arrays_script.js similarity index 100% rename from Basic-Data-Structures/12.Create-complex-multi-dimensional-arrays_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/12.Create-complex-multi-dimensional-arrays_script.js diff --git a/Basic-Data-Structures/13.Add-Key-Value-Pairs-to-JavaScript-Objects_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/13.Add-Key-Value-Pairs-to-JavaScript-Objects_script.js similarity index 100% rename from Basic-Data-Structures/13.Add-Key-Value-Pairs-to-JavaScript-Objects_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/13.Add-Key-Value-Pairs-to-JavaScript-Objects_script.js diff --git a/Basic-Data-Structures/14.Modify-an-Object-Nested-Within-an-Object_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/14.Modify-an-Object-Nested-Within-an-Object_script.js similarity index 100% rename from Basic-Data-Structures/14.Modify-an-Object-Nested-Within-an-Object_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/14.Modify-an-Object-Nested-Within-an-Object_script.js diff --git a/Basic-Data-Structures/15.Access-Property-Names-with-Bracket-Notation_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/15.Access-Property-Names-with-Bracket-Notation_script.js similarity index 100% rename from Basic-Data-Structures/15.Access-Property-Names-with-Bracket-Notation_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/15.Access-Property-Names-with-Bracket-Notation_script.js diff --git a/Basic-Data-Structures/16.Use-the-delete-Keyword-to-Remove-Object-Properties_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/16.Use-the-delete-Keyword-to-Remove-Object-Properties_script.js similarity index 100% rename from Basic-Data-Structures/16.Use-the-delete-Keyword-to-Remove-Object-Properties_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/16.Use-the-delete-Keyword-to-Remove-Object-Properties_script.js diff --git a/Basic-Data-Structures/17.Check-if-an-Object-has-a-Property_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/17.Check-if-an-Object-has-a-Property_script.js similarity index 100% rename from Basic-Data-Structures/17.Check-if-an-Object-has-a-Property_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/17.Check-if-an-Object-has-a-Property_script.js diff --git a/Basic-Data-Structures/18.Iterate-Through-the-Keys-of-an Object-with-a-for-in-Statement_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/18.Iterate-Through-the-Keys-of-an Object-with-a-for-in-Statement_script.js similarity index 100% rename from Basic-Data-Structures/18.Iterate-Through-the-Keys-of-an Object-with-a-for-in-Statement_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/18.Iterate-Through-the-Keys-of-an Object-with-a-for-in-Statement_script.js diff --git a/Basic-Data-Structures/19.Generate-an-Array-of-All-Object-Keys-with-Object.keys()_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/19.Generate-an-Array-of-All-Object-Keys-with-Object.keys()_script.js similarity index 100% rename from Basic-Data-Structures/19.Generate-an-Array-of-All-Object-Keys-with-Object.keys()_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/19.Generate-an-Array-of-All-Object-Keys-with-Object.keys()_script.js diff --git a/Basic-Data-Structures/20.Modify-an-Array-Stored-in-an-Object_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/20.Modify-an-Array-Stored-in-an-Object_script.js similarity index 100% rename from Basic-Data-Structures/20.Modify-an-Array-Stored-in-an-Object_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/20.Modify-an-Array-Stored-in-an-Object_script.js diff --git a/Basic-JavaScript/050-LocalScopeandFunctions.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/050-LocalScopeandFunctions.js similarity index 100% rename from Basic-JavaScript/050-LocalScopeandFunctions.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/050-LocalScopeandFunctions.js diff --git a/Basic-JavaScript/051-Globalvs.LocalScopeinFunctions.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/051-Globalvs.LocalScopeinFunctions.js similarity index 100% rename from Basic-JavaScript/051-Globalvs.LocalScopeinFunctions.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/051-Globalvs.LocalScopeinFunctions.js diff --git a/Basic-JavaScript/052-ReturnaValuefromaFunctionwithReturn.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/052-ReturnaValuefromaFunctionwithReturn.js similarity index 100% rename from Basic-JavaScript/052-ReturnaValuefromaFunctionwithReturn.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/052-ReturnaValuefromaFunctionwithReturn.js diff --git a/Basic-JavaScript/053-UnderstandingUndefinedValuereturnedfromaFunction.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/053-UnderstandingUndefinedValuereturnedfromaFunction.js similarity index 100% rename from Basic-JavaScript/053-UnderstandingUndefinedValuereturnedfromaFunction.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/053-UnderstandingUndefinedValuereturnedfromaFunction.js diff --git a/Basic-JavaScript/054-AssignmentwithaReturnedValue.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/054-AssignmentwithaReturnedValue.js similarity index 100% rename from Basic-JavaScript/054-AssignmentwithaReturnedValue.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/054-AssignmentwithaReturnedValue.js diff --git a/Basic-JavaScript/055-StandinLine.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/055-StandinLine.js similarity index 100% rename from Basic-JavaScript/055-StandinLine.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/055-StandinLine.js diff --git a/Basic-JavaScript/056-UnderstandingBooleanValues.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/056-UnderstandingBooleanValues.js similarity index 100% rename from Basic-JavaScript/056-UnderstandingBooleanValues.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/056-UnderstandingBooleanValues.js diff --git a/Basic-JavaScript/057-UseConditionalLogicwithIfStatements.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/057-UseConditionalLogicwithIfStatements.js similarity index 100% rename from Basic-JavaScript/057-UseConditionalLogicwithIfStatements.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/057-UseConditionalLogicwithIfStatements.js diff --git a/Basic-JavaScript/058-ComparisonwiththeEqualityOperator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/058-ComparisonwiththeEqualityOperator.js similarity index 100% rename from Basic-JavaScript/058-ComparisonwiththeEqualityOperator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/058-ComparisonwiththeEqualityOperator.js diff --git a/Basic-JavaScript/059-ComparisonwiththeStrictEqualityOperator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/059-ComparisonwiththeStrictEqualityOperator.js similarity index 100% rename from Basic-JavaScript/059-ComparisonwiththeStrictEqualityOperator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/059-ComparisonwiththeStrictEqualityOperator.js diff --git a/Basic-Algorithm-Scripting/01.Convert-Celsius-to-Fahrenheit_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/01.Convert-Celsius-to-Fahrenheit_script.js similarity index 100% rename from Basic-Algorithm-Scripting/01.Convert-Celsius-to-Fahrenheit_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/01.Convert-Celsius-to-Fahrenheit_script.js diff --git a/Basic-Algorithm-Scripting/02.Reverse-a-String_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/02.Reverse-a-String_script.js similarity index 100% rename from Basic-Algorithm-Scripting/02.Reverse-a-String_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/02.Reverse-a-String_script.js diff --git a/Basic-Algorithm-Scripting/03.Factorialize-a-Number_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/03.Factorialize-a-Number_script.js similarity index 100% rename from Basic-Algorithm-Scripting/03.Factorialize-a-Number_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/03.Factorialize-a-Number_script.js diff --git a/Basic-Algorithm-Scripting/04.Find-the-Longest-Word-in-a-String_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/04.Find-the-Longest-Word-in-a-String_script.js similarity index 100% rename from Basic-Algorithm-Scripting/04.Find-the-Longest-Word-in-a-String_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/04.Find-the-Longest-Word-in-a-String_script.js diff --git a/Basic-Algorithm-Scripting/05.Return-Largest-Numbers-in-Arrays_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/05.Return-Largest-Numbers-in-Arrays_script.js similarity index 100% rename from Basic-Algorithm-Scripting/05.Return-Largest-Numbers-in-Arrays_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/05.Return-Largest-Numbers-in-Arrays_script.js diff --git a/Basic-Algorithm-Scripting/06.Confirm-the-Ending_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/06.Confirm-the-Ending_script.js similarity index 100% rename from Basic-Algorithm-Scripting/06.Confirm-the-Ending_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/06.Confirm-the-Ending_script.js diff --git a/Basic-Algorithm-Scripting/07.Repeat-a-String-Repeat-a-String_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/07.Repeat-a-String-Repeat-a-String_script.js similarity index 100% rename from Basic-Algorithm-Scripting/07.Repeat-a-String-Repeat-a-String_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/07.Repeat-a-String-Repeat-a-String_script.js diff --git a/Basic-Algorithm-Scripting/08.Truncate-a-String_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/08.Truncate-a-String_script.js similarity index 100% rename from Basic-Algorithm-Scripting/08.Truncate-a-String_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/08.Truncate-a-String_script.js diff --git a/Basic-Algorithm-Scripting/09.Finders-Keepers_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/09.Finders-Keepers_script.js similarity index 100% rename from Basic-Algorithm-Scripting/09.Finders-Keepers_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/09.Finders-Keepers_script.js diff --git a/Basic-Algorithm-Scripting/10.Boo-who_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/10.Boo-who_script.js similarity index 100% rename from Basic-Algorithm-Scripting/10.Boo-who_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/10.Boo-who_script.js diff --git a/Basic-Algorithm-Scripting/11.Title-Case-a-Sentence_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/11.Title-Case-a-Sentence_script.js similarity index 100% rename from Basic-Algorithm-Scripting/11.Title-Case-a-Sentence_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/11.Title-Case-a-Sentence_script.js diff --git a/Basic-Algorithm-Scripting/12.Slice-and-Splice_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/12.Slice-and-Splice_script.js similarity index 100% rename from Basic-Algorithm-Scripting/12.Slice-and-Splice_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/12.Slice-and-Splice_script.js diff --git a/Basic-Algorithm-Scripting/13.Falsy-Bouncer_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/13.Falsy-Bouncer_script.js similarity index 100% rename from Basic-Algorithm-Scripting/13.Falsy-Bouncer_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/13.Falsy-Bouncer_script.js diff --git a/Basic-Algorithm-Scripting/14.Where-do-I-Belong_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/14.Where-do-I-Belong_script.js similarity index 100% rename from Basic-Algorithm-Scripting/14.Where-do-I-Belong_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/14.Where-do-I-Belong_script.js diff --git a/Basic-Algorithm-Scripting/15.Mutations_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/15.Mutations_script.js similarity index 100% rename from Basic-Algorithm-Scripting/15.Mutations_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/15.Mutations_script.js diff --git a/Basic-Algorithm-Scripting/16.Chunky-Monkey_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/16.Chunky-Monkey_script.js similarity index 100% rename from Basic-Algorithm-Scripting/16.Chunky-Monkey_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/16.Chunky-Monkey_script.js diff --git a/Basic-JavaScript/060-Practicecomparingdifferentvalues.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/060-Practicecomparingdifferentvalues.js similarity index 100% rename from Basic-JavaScript/060-Practicecomparingdifferentvalues.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/060-Practicecomparingdifferentvalues.js diff --git a/Basic-JavaScript/061-ComparisonwiththeInequalityOperator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/061-ComparisonwiththeInequalityOperator.js similarity index 100% rename from Basic-JavaScript/061-ComparisonwiththeInequalityOperator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/061-ComparisonwiththeInequalityOperator.js diff --git a/Basic-JavaScript/062-ComparisonwiththeStrictInequalityOperator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/062-ComparisonwiththeStrictInequalityOperator.js similarity index 100% rename from Basic-JavaScript/062-ComparisonwiththeStrictInequalityOperator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/062-ComparisonwiththeStrictInequalityOperator.js diff --git a/Basic-JavaScript/063-ComparisonwiththeGreaterThanOperator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/063-ComparisonwiththeGreaterThanOperator.js similarity index 100% rename from Basic-JavaScript/063-ComparisonwiththeGreaterThanOperator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/063-ComparisonwiththeGreaterThanOperator.js diff --git a/Basic-JavaScript/064-ComparisonwiththeGreaterThanOrEqualToOperator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/064-ComparisonwiththeGreaterThanOrEqualToOperator.js similarity index 100% rename from Basic-JavaScript/064-ComparisonwiththeGreaterThanOrEqualToOperator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/064-ComparisonwiththeGreaterThanOrEqualToOperator.js diff --git a/Basic-JavaScript/065-ComparisonwiththeLessThanOperator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/065-ComparisonwiththeLessThanOperator.js similarity index 100% rename from Basic-JavaScript/065-ComparisonwiththeLessThanOperator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/065-ComparisonwiththeLessThanOperator.js diff --git a/Basic-JavaScript/066-ComparisonwiththeLessThanOrEqualToOperator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/066-ComparisonwiththeLessThanOrEqualToOperator.js similarity index 100% rename from Basic-JavaScript/066-ComparisonwiththeLessThanOrEqualToOperator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/066-ComparisonwiththeLessThanOrEqualToOperator.js diff --git a/Basic-JavaScript/067-ComparisonswiththeLogicalAndOperator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/067-ComparisonswiththeLogicalAndOperator.js similarity index 100% rename from Basic-JavaScript/067-ComparisonswiththeLogicalAndOperator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/067-ComparisonswiththeLogicalAndOperator.js diff --git a/Basic-JavaScript/068-ComparisonswiththeLogicalOrOperator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/068-ComparisonswiththeLogicalOrOperator.js similarity index 100% rename from Basic-JavaScript/068-ComparisonswiththeLogicalOrOperator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/068-ComparisonswiththeLogicalOrOperator.js diff --git a/Basic-JavaScript/069-IntroducingElseStatements.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/069-IntroducingElseStatements.js similarity index 100% rename from Basic-JavaScript/069-IntroducingElseStatements.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/069-IntroducingElseStatements.js diff --git a/Object-Oriented-Programming/01.Create-a-Basic-JavaScript-Object_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/01.Create-a-Basic-JavaScript-Object_script.js similarity index 100% rename from Object-Oriented-Programming/01.Create-a-Basic-JavaScript-Object_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/01.Create-a-Basic-JavaScript-Object_script.js diff --git a/Object-Oriented-Programming/02.Use-Dot-Notation-to-Access-the-Properties-of-an-Object_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/02.Use-Dot-Notation-to-Access-the-Properties-of-an-Object_script.js similarity index 100% rename from Object-Oriented-Programming/02.Use-Dot-Notation-to-Access-the-Properties-of-an-Object_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/02.Use-Dot-Notation-to-Access-the-Properties-of-an-Object_script.js diff --git a/Object-Oriented-Programming/03.Create-a-Method-on-an-Object_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/03.Create-a-Method-on-an-Object_script.js similarity index 100% rename from Object-Oriented-Programming/03.Create-a-Method-on-an-Object_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/03.Create-a-Method-on-an-Object_script.js diff --git a/Object-Oriented-Programming/04.Make-Code-More-Reusable-with-the-this-Keyword_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/04.Make-Code-More-Reusable-with-the-this-Keyword_script.js similarity index 100% rename from Object-Oriented-Programming/04.Make-Code-More-Reusable-with-the-this-Keyword_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/04.Make-Code-More-Reusable-with-the-this-Keyword_script.js diff --git a/Object-Oriented-Programming/05.Define-a-Constructor-Function_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/05.Define-a-Constructor-Function_script.js similarity index 100% rename from Object-Oriented-Programming/05.Define-a-Constructor-Function_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/05.Define-a-Constructor-Function_script.js diff --git a/Object-Oriented-Programming/06.Use-a-Constructor-to-Create-Objects_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/06.Use-a-Constructor-to-Create-Objects_script.js similarity index 100% rename from Object-Oriented-Programming/06.Use-a-Constructor-to-Create-Objects_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/06.Use-a-Constructor-to-Create-Objects_script.js diff --git a/Object-Oriented-Programming/07.Extend-Constructors-to-Receive-Arguments_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/07.Extend-Constructors-to-Receive-Arguments_script.js similarity index 100% rename from Object-Oriented-Programming/07.Extend-Constructors-to-Receive-Arguments_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/07.Extend-Constructors-to-Receive-Arguments_script.js diff --git a/Object-Oriented-Programming/08.Verify-an-Object's-Constructor-with-instanceof_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/08.Verify-an-Object's-Constructor-with-instanceof_script.js similarity index 100% rename from Object-Oriented-Programming/08.Verify-an-Object's-Constructor-with-instanceof_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/08.Verify-an-Object's-Constructor-with-instanceof_script.js diff --git a/Object-Oriented-Programming/09.Understand-Own-Properties_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/09.Understand-Own-Properties_script.js similarity index 100% rename from Object-Oriented-Programming/09.Understand-Own-Properties_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/09.Understand-Own-Properties_script.js diff --git a/Object-Oriented-Programming/10.Use-Prototype-Properties-to-Reduce-Duplicate-Code_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/10.Use-Prototype-Properties-to-Reduce-Duplicate-Code_script.js similarity index 100% rename from Object-Oriented-Programming/10.Use-Prototype-Properties-to-Reduce-Duplicate-Code_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/10.Use-Prototype-Properties-to-Reduce-Duplicate-Code_script.js diff --git a/Object-Oriented-Programming/11.Iterate-Over-All-Properties_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/11.Iterate-Over-All-Properties_script.js similarity index 100% rename from Object-Oriented-Programming/11.Iterate-Over-All-Properties_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/11.Iterate-Over-All-Properties_script.js diff --git a/Object-Oriented-Programming/12.Understand-the-Constructor-Property_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/12.Understand-the-Constructor-Property_script.js similarity index 100% rename from Object-Oriented-Programming/12.Understand-the-Constructor-Property_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/12.Understand-the-Constructor-Property_script.js diff --git a/Object-Oriented-Programming/13.Change-the-Prototype-to-a-New-Object_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/13.Change-the-Prototype-to-a-New-Object_script.js similarity index 100% rename from Object-Oriented-Programming/13.Change-the-Prototype-to-a-New-Object_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/13.Change-the-Prototype-to-a-New-Object_script.js diff --git a/Object-Oriented-Programming/14.Remember-to-Set-the-Constructor-Property-when-Changing-the-Prototype_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/14.Remember-to-Set-the-Constructor-Property-when-Changing-the-Prototype_script.js similarity index 100% rename from Object-Oriented-Programming/14.Remember-to-Set-the-Constructor-Property-when-Changing-the-Prototype_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/14.Remember-to-Set-the-Constructor-Property-when-Changing-the-Prototype_script.js diff --git "a/Object-Oriented-Programming/15.Understand-Where-an-Object\342\200\231s-Prototype-Comes-From_script.js" "b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/15.Understand-Where-an-Object\342\200\231s-Prototype-Comes-From_script.js" similarity index 100% rename from "Object-Oriented-Programming/15.Understand-Where-an-Object\342\200\231s-Prototype-Comes-From_script.js" rename to "JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/15.Understand-Where-an-Object\342\200\231s-Prototype-Comes-From_script.js" diff --git a/Object-Oriented-Programming/16.Understand-the-Prototype-Chain_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/16.Understand-the-Prototype-Chain_script.js similarity index 100% rename from Object-Oriented-Programming/16.Understand-the-Prototype-Chain_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/16.Understand-the-Prototype-Chain_script.js diff --git a/Object-Oriented-Programming/17.Use-Inheritance-So-You-Don't-Repeat-Yourself_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/17.Use-Inheritance-So-You-Don't-Repeat-Yourself_script.js similarity index 100% rename from Object-Oriented-Programming/17.Use-Inheritance-So-You-Don't-Repeat-Yourself_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/17.Use-Inheritance-So-You-Don't-Repeat-Yourself_script.js diff --git a/Object-Oriented-Programming/18.Inherit-Behaviors-from-a-Supertype_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/18.Inherit-Behaviors-from-a-Supertype_script.js similarity index 100% rename from Object-Oriented-Programming/18.Inherit-Behaviors-from-a-Supertype_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/18.Inherit-Behaviors-from-a-Supertype_script.js diff --git a/Object-Oriented-Programming/19.Set-the-Child's-Prototype-to-an-Instance-of-the-Parent_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/19.Set-the-Child's-Prototype-to-an-Instance-of-the-Parent_script.js similarity index 100% rename from Object-Oriented-Programming/19.Set-the-Child's-Prototype-to-an-Instance-of-the-Parent_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/19.Set-the-Child's-Prototype-to-an-Instance-of-the-Parent_script.js diff --git a/Object-Oriented-Programming/20.Reset-an-Inherited-Constructor-Property_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/20.Reset-an-Inherited-Constructor-Property_script.js similarity index 100% rename from Object-Oriented-Programming/20.Reset-an-Inherited-Constructor-Property_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/20.Reset-an-Inherited-Constructor-Property_script.js diff --git a/Object-Oriented-Programming/21.Add-Methods-After-Inheritance_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/21.Add-Methods-After-Inheritance_script.js similarity index 100% rename from Object-Oriented-Programming/21.Add-Methods-After-Inheritance_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/21.Add-Methods-After-Inheritance_script.js diff --git a/Object-Oriented-Programming/22.Override-Inherited-Methods_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/22.Override-Inherited-Methods_script.js similarity index 100% rename from Object-Oriented-Programming/22.Override-Inherited-Methods_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/22.Override-Inherited-Methods_script.js diff --git a/Object-Oriented-Programming/23.Use-a-Mixin-to-Add-Common-Behavior-Between-Unrelated-Objects_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/23.Use-a-Mixin-to-Add-Common-Behavior-Between-Unrelated-Objects_script.js similarity index 100% rename from Object-Oriented-Programming/23.Use-a-Mixin-to-Add-Common-Behavior-Between-Unrelated-Objects_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/23.Use-a-Mixin-to-Add-Common-Behavior-Between-Unrelated-Objects_script.js diff --git a/Object-Oriented-Programming/24.Use-Closure-to-Protect-Properties-Within-an-Object-from-Being-Modified-Externally_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/24.Use-Closure-to-Protect-Properties-Within-an-Object-from-Being-Modified-Externally_script.js similarity index 100% rename from Object-Oriented-Programming/24.Use-Closure-to-Protect-Properties-Within-an-Object-from-Being-Modified-Externally_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/24.Use-Closure-to-Protect-Properties-Within-an-Object-from-Being-Modified-Externally_script.js diff --git a/Object-Oriented-Programming/25.Understand-the-Immediately-Invoked-Function-Expression-(IIFE)_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/25.Understand-the-Immediately-Invoked-Function-Expression-(IIFE)_script.js similarity index 100% rename from Object-Oriented-Programming/25.Understand-the-Immediately-Invoked-Function-Expression-(IIFE)_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/25.Understand-the-Immediately-Invoked-Function-Expression-(IIFE)_script.js diff --git a/Object-Oriented-Programming/26.Use-an-IIFE-to-Create-a-Module_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/26.Use-an-IIFE-to-Create-a-Module_script.js similarity index 100% rename from Object-Oriented-Programming/26.Use-an-IIFE-to-Create-a-Module_script.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/26.Use-an-IIFE-to-Create-a-Module_script.js diff --git a/Basic-JavaScript/070-IntroducingElseIfStatements.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/070-IntroducingElseIfStatements.js similarity index 100% rename from Basic-JavaScript/070-IntroducingElseIfStatements.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/070-IntroducingElseIfStatements.js diff --git a/Basic-JavaScript/071-LogicalOrderinIfElseStatements.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/071-LogicalOrderinIfElseStatements.js similarity index 100% rename from Basic-JavaScript/071-LogicalOrderinIfElseStatements.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/071-LogicalOrderinIfElseStatements.js diff --git a/Basic-JavaScript/072-ChainingIfElseStatements.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/072-ChainingIfElseStatements.js similarity index 100% rename from Basic-JavaScript/072-ChainingIfElseStatements.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/072-ChainingIfElseStatements.js diff --git a/Basic-JavaScript/073-GolfCode.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/073-GolfCode.js similarity index 100% rename from Basic-JavaScript/073-GolfCode.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/073-GolfCode.js diff --git a/Basic-JavaScript/074-SelectingfromManyOptionswithSwitchStatements.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/074-SelectingfromManyOptionswithSwitchStatements.js similarity index 100% rename from Basic-JavaScript/074-SelectingfromManyOptionswithSwitchStatements.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/074-SelectingfromManyOptionswithSwitchStatements.js diff --git a/Basic-JavaScript/075-AddingaDefaultOptioninSwitchStatements.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/075-AddingaDefaultOptioninSwitchStatements.js similarity index 100% rename from Basic-JavaScript/075-AddingaDefaultOptioninSwitchStatements.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/075-AddingaDefaultOptioninSwitchStatements.js diff --git a/Basic-JavaScript/076-MultipleIdenticalOptionsinSwitchStatements.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/076-MultipleIdenticalOptionsinSwitchStatements.js similarity index 100% rename from Basic-JavaScript/076-MultipleIdenticalOptionsinSwitchStatements.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/076-MultipleIdenticalOptionsinSwitchStatements.js diff --git a/Basic-JavaScript/077-ReplacingIfElseChainswithSwitch.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/077-ReplacingIfElseChainswithSwitch.js similarity index 100% rename from Basic-JavaScript/077-ReplacingIfElseChainswithSwitch.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/077-ReplacingIfElseChainswithSwitch.js diff --git a/Basic-JavaScript/078-ReturningBooleanValuesfromFunctions.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/078-ReturningBooleanValuesfromFunctions.js similarity index 100% rename from Basic-JavaScript/078-ReturningBooleanValuesfromFunctions.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/078-ReturningBooleanValuesfromFunctions.js diff --git a/Basic-JavaScript/079-ReturnEarlyPatternforFunctions.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/079-ReturnEarlyPatternforFunctions.js similarity index 100% rename from Basic-JavaScript/079-ReturnEarlyPatternforFunctions.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/079-ReturnEarlyPatternforFunctions.js diff --git a/Functional-Programming/01.Learn-About-Functional-Programming.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/01.Learn-About-Functional-Programming.js similarity index 100% rename from Functional-Programming/01.Learn-About-Functional-Programming.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/01.Learn-About-Functional-Programming.js diff --git a/Functional-Programming/02.Understand-Functional-Programming-Terminology.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/02.Understand-Functional-Programming-Terminology.js similarity index 100% rename from Functional-Programming/02.Understand-Functional-Programming-Terminology.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/02.Understand-Functional-Programming-Terminology.js diff --git a/Functional-Programming/03.Understand-the-Hazards-of-Using-Imperative-Code.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/03.Understand-the-Hazards-of-Using-Imperative-Code.js similarity index 100% rename from Functional-Programming/03.Understand-the-Hazards-of-Using-Imperative-Code.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/03.Understand-the-Hazards-of-Using-Imperative-Code.js diff --git a/Functional-Programming/04.Avoid-Mutations-and-Side-Effects-Using-Functional-Programming.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/04.Avoid-Mutations-and-Side-Effects-Using-Functional-Programming.js similarity index 100% rename from Functional-Programming/04.Avoid-Mutations-and-Side-Effects-Using-Functional-Programming.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/04.Avoid-Mutations-and-Side-Effects-Using-Functional-Programming.js diff --git a/Functional-Programming/05.Pass-Arguments-to-Avoid-External-Dependence-in-a-Function.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/05.Pass-Arguments-to-Avoid-External-Dependence-in-a-Function.js similarity index 100% rename from Functional-Programming/05.Pass-Arguments-to-Avoid-External-Dependence-in-a-Function.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/05.Pass-Arguments-to-Avoid-External-Dependence-in-a-Function.js diff --git a/Functional-Programming/06.Refactor-Global-Variables-Out-of-Functions.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/06.Refactor-Global-Variables-Out-of-Functions.js similarity index 100% rename from Functional-Programming/06.Refactor-Global-Variables-Out-of-Functions.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/06.Refactor-Global-Variables-Out-of-Functions.js diff --git a/Functional-Programming/07.Use-the-map-Method-to-Extract-Data-from-an-Array.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/07.Use-the-map-Method-to-Extract-Data-from-an-Array.js similarity index 100% rename from Functional-Programming/07.Use-the-map-Method-to-Extract-Data-from-an-Array.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/07.Use-the-map-Method-to-Extract-Data-from-an-Array.js diff --git a/Functional-Programming/08.Implement-map-on-a-Prototype.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/08.Implement-map-on-a-Prototype.js similarity index 100% rename from Functional-Programming/08.Implement-map-on-a-Prototype.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/08.Implement-map-on-a-Prototype.js diff --git a/Functional-Programming/09.Use-the-filter-Method-to-Extract-Data-from-an-Array.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/09.Use-the-filter-Method-to-Extract-Data-from-an-Array.js similarity index 100% rename from Functional-Programming/09.Use-the-filter-Method-to-Extract-Data-from-an-Array.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/09.Use-the-filter-Method-to-Extract-Data-from-an-Array.js diff --git a/Functional-Programming/10.Implement-the-filter-Method-on-a-Prototype.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/10.Implement-the-filter-Method-on-a-Prototype.js similarity index 100% rename from Functional-Programming/10.Implement-the-filter-Method-on-a-Prototype.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/10.Implement-the-filter-Method-on-a-Prototype.js diff --git a/Functional-Programming/11.Return-Part-of-an-Array-Using-the-slice-Method.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/11.Return-Part-of-an-Array-Using-the-slice-Method.js similarity index 100% rename from Functional-Programming/11.Return-Part-of-an-Array-Using-the-slice-Method.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/11.Return-Part-of-an-Array-Using-the-slice-Method.js diff --git a/Functional-Programming/12.Remove-Elements-from-an-Array-Using-slice-Instead-of-splice.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/12.Remove-Elements-from-an-Array-Using-slice-Instead-of-splice.js similarity index 100% rename from Functional-Programming/12.Remove-Elements-from-an-Array-Using-slice-Instead-of-splice.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/12.Remove-Elements-from-an-Array-Using-slice-Instead-of-splice.js diff --git a/Functional-Programming/13.Combine-Two-Arrays-Using-the-concat-Method.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/13.Combine-Two-Arrays-Using-the-concat-Method.js similarity index 100% rename from Functional-Programming/13.Combine-Two-Arrays-Using-the-concat-Method.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/13.Combine-Two-Arrays-Using-the-concat-Method.js diff --git a/Functional-Programming/14.Add-Elements-to-the-End-of-an-Array-Using-concat-Instead-of-push.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/14.Add-Elements-to-the-End-of-an-Array-Using-concat-Instead-of-push.js similarity index 100% rename from Functional-Programming/14.Add-Elements-to-the-End-of-an-Array-Using-concat-Instead-of-push.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/14.Add-Elements-to-the-End-of-an-Array-Using-concat-Instead-of-push.js diff --git a/Functional-Programming/15.Use-the-reduce-Method-to-Analyze-Data.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/15.Use-the-reduce-Method-to-Analyze-Data.js similarity index 100% rename from Functional-Programming/15.Use-the-reduce-Method-to-Analyze-Data.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/15.Use-the-reduce-Method-to-Analyze-Data.js diff --git a/Functional-Programming/16.Use-Higher-Order-Functions-map-filter-or-reduce-to-Solve-a-Complex-Problem.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/16.Use-Higher-Order-Functions-map-filter-or-reduce-to-Solve-a-Complex-Problem.js similarity index 100% rename from Functional-Programming/16.Use-Higher-Order-Functions-map-filter-or-reduce-to-Solve-a-Complex-Problem.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/16.Use-Higher-Order-Functions-map-filter-or-reduce-to-Solve-a-Complex-Problem.js diff --git a/Functional-Programming/17.Sort-an-Array-Alphabetically-using-the-sort-Method.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/17.Sort-an-Array-Alphabetically-using-the-sort-Method.js similarity index 100% rename from Functional-Programming/17.Sort-an-Array-Alphabetically-using-the-sort-Method.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/17.Sort-an-Array-Alphabetically-using-the-sort-Method.js diff --git a/Functional-Programming/18.Return-a-Sorted-Array-Without-Changing-the-Original-Array.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/18.Return-a-Sorted-Array-Without-Changing-the-Original-Array.js similarity index 100% rename from Functional-Programming/18.Return-a-Sorted-Array-Without-Changing-the-Original-Array.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/18.Return-a-Sorted-Array-Without-Changing-the-Original-Array.js diff --git a/Functional-Programming/19.Split-a-String-into-an-Array-Using-the-split-Method.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/19.Split-a-String-into-an-Array-Using-the-split-Method.js similarity index 100% rename from Functional-Programming/19.Split-a-String-into-an-Array-Using-the-split-Method.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/19.Split-a-String-into-an-Array-Using-the-split-Method.js diff --git a/Functional-Programming/20.Combine-an-Array-into-a-String-Using-the-join-Method.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/20.Combine-an-Array-into-a-String-Using-the-join-Method.js similarity index 100% rename from Functional-Programming/20.Combine-an-Array-into-a-String-Using-the-join-Method.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/20.Combine-an-Array-into-a-String-Using-the-join-Method.js diff --git a/Functional-Programming/21.Apply-Functional-Programming-to-Convert-Strings-to-URL-Slugs.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/21.Apply-Functional-Programming-to-Convert-Strings-to-URL-Slugs.js similarity index 100% rename from Functional-Programming/21.Apply-Functional-Programming-to-Convert-Strings-to-URL-Slugs.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/21.Apply-Functional-Programming-to-Convert-Strings-to-URL-Slugs.js diff --git a/Functional-Programming/22.Use-the-every-Method-to-Check-that-Every-Element-in-an-Array-Meets-a-Criteria.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/22.Use-the-every-Method-to-Check-that-Every-Element-in-an-Array-Meets-a-Criteria.js similarity index 100% rename from Functional-Programming/22.Use-the-every-Method-to-Check-that-Every-Element-in-an-Array-Meets-a-Criteria.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/22.Use-the-every-Method-to-Check-that-Every-Element-in-an-Array-Meets-a-Criteria.js diff --git a/Functional-Programming/23.Use-the-some-Method-to-Check-that-Any-Elements-in-an-Array-Meet-a-Criteria.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/23.Use-the-some-Method-to-Check-that-Any-Elements-in-an-Array-Meet-a-Criteria.js similarity index 100% rename from Functional-Programming/23.Use-the-some-Method-to-Check-that-Any-Elements-in-an-Array-Meet-a-Criteria.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/23.Use-the-some-Method-to-Check-that-Any-Elements-in-an-Array-Meet-a-Criteria.js diff --git a/Functional-Programming/24.Introduction-to-Currying-and-Partial-Application.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/24.Introduction-to-Currying-and-Partial-Application.js similarity index 100% rename from Functional-Programming/24.Introduction-to-Currying-and-Partial-Application.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/24.Introduction-to-Currying-and-Partial-Application.js diff --git a/Basic-JavaScript/080-CountingCards.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/080-CountingCards.js similarity index 100% rename from Basic-JavaScript/080-CountingCards.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/080-CountingCards.js diff --git a/Basic-JavaScript/081-BuildJavaScriptObjects.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/081-BuildJavaScriptObjects.js similarity index 100% rename from Basic-JavaScript/081-BuildJavaScriptObjects.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/081-BuildJavaScriptObjects.js diff --git a/Basic-JavaScript/082-AccessingObjectPropertieswithDotNotation.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/082-AccessingObjectPropertieswithDotNotation.js similarity index 100% rename from Basic-JavaScript/082-AccessingObjectPropertieswithDotNotation.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/082-AccessingObjectPropertieswithDotNotation.js diff --git a/Basic-JavaScript/083-AccessingObjectPropertieswithBracketNotation.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/083-AccessingObjectPropertieswithBracketNotation.js similarity index 100% rename from Basic-JavaScript/083-AccessingObjectPropertieswithBracketNotation.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/083-AccessingObjectPropertieswithBracketNotation.js diff --git a/Basic-JavaScript/084-AccessingObjectPropertieswithVariables.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/084-AccessingObjectPropertieswithVariables.js similarity index 100% rename from Basic-JavaScript/084-AccessingObjectPropertieswithVariables.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/084-AccessingObjectPropertieswithVariables.js diff --git a/Basic-JavaScript/085-UpdatingObjectProperties.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/085-UpdatingObjectProperties.js similarity index 100% rename from Basic-JavaScript/085-UpdatingObjectProperties.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/085-UpdatingObjectProperties.js diff --git a/Basic-JavaScript/086-AddNewPropertiestoaJavaScriptObject.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/086-AddNewPropertiestoaJavaScriptObject.js similarity index 100% rename from Basic-JavaScript/086-AddNewPropertiestoaJavaScriptObject.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/086-AddNewPropertiestoaJavaScriptObject.js diff --git a/Basic-JavaScript/087-DeletePropertiesfromaJavaScriptObject.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/087-DeletePropertiesfromaJavaScriptObject.js similarity index 100% rename from Basic-JavaScript/087-DeletePropertiesfromaJavaScriptObject.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/087-DeletePropertiesfromaJavaScriptObject.js diff --git a/Basic-JavaScript/088-UsingObjectsforLookups.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/088-UsingObjectsforLookups.js similarity index 100% rename from Basic-JavaScript/088-UsingObjectsforLookups.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/088-UsingObjectsforLookups.js diff --git a/Basic-JavaScript/089-TestingObjectsforProperties.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/089-TestingObjectsforProperties.js similarity index 100% rename from Basic-JavaScript/089-TestingObjectsforProperties.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/089-TestingObjectsforProperties.js diff --git a/Intermediate-Algorithm-Scripting/01.Sum-All-Numbers-in-a-Range.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/01.Sum-All-Numbers-in-a-Range.js similarity index 100% rename from Intermediate-Algorithm-Scripting/01.Sum-All-Numbers-in-a-Range.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/01.Sum-All-Numbers-in-a-Range.js diff --git a/Intermediate-Algorithm-Scripting/02.Diff-Two-Arrays.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/02.Diff-Two-Arrays.js similarity index 100% rename from Intermediate-Algorithm-Scripting/02.Diff-Two-Arrays.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/02.Diff-Two-Arrays.js diff --git a/Intermediate-Algorithm-Scripting/03.Seek-and-Destroy.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/03.Seek-and-Destroy.js similarity index 100% rename from Intermediate-Algorithm-Scripting/03.Seek-and-Destroy.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/03.Seek-and-Destroy.js diff --git a/Intermediate-Algorithm-Scripting/04.Where-art-thou.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/04.Where-art-thou.js similarity index 100% rename from Intermediate-Algorithm-Scripting/04.Where-art-thou.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/04.Where-art-thou.js diff --git a/Intermediate-Algorithm-Scripting/05.Spinal-Tap-Case.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/05.Spinal-Tap-Case.js similarity index 100% rename from Intermediate-Algorithm-Scripting/05.Spinal-Tap-Case.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/05.Spinal-Tap-Case.js diff --git a/Intermediate-Algorithm-Scripting/06.Pig-Latin.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/06.Pig-Latin.js similarity index 100% rename from Intermediate-Algorithm-Scripting/06.Pig-Latin.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/06.Pig-Latin.js diff --git a/Intermediate-Algorithm-Scripting/07.Search-and-Replace.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/07.Search-and-Replace.js similarity index 100% rename from Intermediate-Algorithm-Scripting/07.Search-and-Replace.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/07.Search-and-Replace.js diff --git a/Intermediate-Algorithm-Scripting/08.DNA-Pairing.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/08.DNA-Pairing.js similarity index 100% rename from Intermediate-Algorithm-Scripting/08.DNA-Pairing.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/08.DNA-Pairing.js diff --git a/Intermediate-Algorithm-Scripting/09.Missing-letters.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/09.Missing-letters.js similarity index 100% rename from Intermediate-Algorithm-Scripting/09.Missing-letters.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/09.Missing-letters.js diff --git a/Intermediate-Algorithm-Scripting/10.Sorted-Union.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/10.Sorted-Union.js similarity index 100% rename from Intermediate-Algorithm-Scripting/10.Sorted-Union.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/10.Sorted-Union.js diff --git a/Intermediate-Algorithm-Scripting/11.Convert-HTML-Entities.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/11.Convert-HTML-Entities.js similarity index 100% rename from Intermediate-Algorithm-Scripting/11.Convert-HTML-Entities.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/11.Convert-HTML-Entities.js diff --git a/Intermediate-Algorithm-Scripting/12.Sum-All-Odd-Fibonacci-Numbers.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/12.Sum-All-Odd-Fibonacci-Numbers.js similarity index 100% rename from Intermediate-Algorithm-Scripting/12.Sum-All-Odd-Fibonacci-Numbers.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/12.Sum-All-Odd-Fibonacci-Numbers.js diff --git a/Intermediate-Algorithm-Scripting/13.Sum-All-Primes.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/13.Sum-All-Primes.js similarity index 100% rename from Intermediate-Algorithm-Scripting/13.Sum-All-Primes.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/13.Sum-All-Primes.js diff --git a/Intermediate-Algorithm-Scripting/14.Smallest-Common-Multiple.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/14.Smallest-Common-Multiple.js similarity index 100% rename from Intermediate-Algorithm-Scripting/14.Smallest-Common-Multiple.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/14.Smallest-Common-Multiple.js diff --git a/Intermediate-Algorithm-Scripting/15.Drop-it.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/15.Drop-it.js similarity index 100% rename from Intermediate-Algorithm-Scripting/15.Drop-it.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/15.Drop-it.js diff --git a/Intermediate-Algorithm-Scripting/16.Steamroller.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/16.Steamroller.js similarity index 100% rename from Intermediate-Algorithm-Scripting/16.Steamroller.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/16.Steamroller.js diff --git a/Intermediate-Algorithm-Scripting/17.Binary-Agents.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/17.Binary-Agents.js similarity index 100% rename from Intermediate-Algorithm-Scripting/17.Binary-Agents.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/17.Binary-Agents.js diff --git a/Intermediate-Algorithm-Scripting/18.Everything-Be-True.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/18.Everything-Be-True.js similarity index 100% rename from Intermediate-Algorithm-Scripting/18.Everything-Be-True.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/18.Everything-Be-True.js diff --git a/Intermediate-Algorithm-Scripting/19.Arguments-Optional.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/19.Arguments-Optional.js similarity index 100% rename from Intermediate-Algorithm-Scripting/19.Arguments-Optional.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/19.Arguments-Optional.js diff --git a/Intermediate-Algorithm-Scripting/20.Make-a-Person.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/20.Make-a-Person.js similarity index 100% rename from Intermediate-Algorithm-Scripting/20.Make-a-Person.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/20.Make-a-Person.js diff --git a/Intermediate-Algorithm-Scripting/21.Map-the-Debris.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/21.Map-the-Debris.js similarity index 100% rename from Intermediate-Algorithm-Scripting/21.Map-the-Debris.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/21.Map-the-Debris.js diff --git a/Basic-JavaScript/090-ManipulatingComplexObjects.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/090-ManipulatingComplexObjects.js similarity index 100% rename from Basic-JavaScript/090-ManipulatingComplexObjects.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/090-ManipulatingComplexObjects.js diff --git a/Basic-JavaScript/091-AccessingNestedObjects.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/091-AccessingNestedObjects.js similarity index 100% rename from Basic-JavaScript/091-AccessingNestedObjects.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/091-AccessingNestedObjects.js diff --git a/Basic-JavaScript/092-AccessingNestedArrays.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/092-AccessingNestedArrays.js similarity index 100% rename from Basic-JavaScript/092-AccessingNestedArrays.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/092-AccessingNestedArrays.js diff --git a/Basic-JavaScript/093-RecordCollection.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/093-RecordCollection.js similarity index 100% rename from Basic-JavaScript/093-RecordCollection.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/093-RecordCollection.js diff --git a/Basic-JavaScript/094-IteratewithJavaScriptWhileLoops.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/094-IteratewithJavaScriptWhileLoops.js similarity index 100% rename from Basic-JavaScript/094-IteratewithJavaScriptWhileLoops.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/094-IteratewithJavaScriptWhileLoops.js diff --git a/Basic-JavaScript/095-IteratewithJavaScriptForLoops.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/095-IteratewithJavaScriptForLoops.js similarity index 100% rename from Basic-JavaScript/095-IteratewithJavaScriptForLoops.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/095-IteratewithJavaScriptForLoops.js diff --git a/Basic-JavaScript/096-IterateOddNumbersWithaForLoop.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/096-IterateOddNumbersWithaForLoop.js similarity index 100% rename from Basic-JavaScript/096-IterateOddNumbersWithaForLoop.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/096-IterateOddNumbersWithaForLoop.js diff --git a/Basic-JavaScript/097-CountBackwardsWithaForLoop.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/097-CountBackwardsWithaForLoop.js similarity index 100% rename from Basic-JavaScript/097-CountBackwardsWithaForLoop.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/097-CountBackwardsWithaForLoop.js diff --git a/Basic-JavaScript/098-IterateThroughanArraywithaForLoop.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/098-IterateThroughanArraywithaForLoop.js similarity index 100% rename from Basic-JavaScript/098-IterateThroughanArraywithaForLoop.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/098-IterateThroughanArraywithaForLoop.js diff --git a/Basic-JavaScript/099-NestingForLoops.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/099-NestingForLoops.js similarity index 100% rename from Basic-JavaScript/099-NestingForLoops.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/099-NestingForLoops.js diff --git a/JavaScript-Algorithms-and-Data-Structures-Projects/Caesars-Cipher.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Caesars-Cipher.js similarity index 100% rename from JavaScript-Algorithms-and-Data-Structures-Projects/Caesars-Cipher.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Caesars-Cipher.js diff --git a/JavaScript-Algorithms-and-Data-Structures-Projects/Cash-Register.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Cash-Register.js similarity index 100% rename from JavaScript-Algorithms-and-Data-Structures-Projects/Cash-Register.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Cash-Register.js diff --git a/JavaScript-Algorithms-and-Data-Structures-Projects/Palindrome-Checker.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Palindrome-Checker.js similarity index 100% rename from JavaScript-Algorithms-and-Data-Structures-Projects/Palindrome-Checker.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Palindrome-Checker.js diff --git a/JavaScript-Algorithms-and-Data-Structures-Projects/Roman-Numeral-Converter.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Roman-Numeral-Converter.js similarity index 100% rename from JavaScript-Algorithms-and-Data-Structures-Projects/Roman-Numeral-Converter.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Roman-Numeral-Converter.js diff --git a/JavaScript-Algorithms-and-Data-Structures-Projects/Telephone-Number-Validator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Telephone-Number-Validator.js similarity index 100% rename from JavaScript-Algorithms-and-Data-Structures-Projects/Telephone-Number-Validator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Telephone-Number-Validator.js diff --git a/Basic-JavaScript/100-IteratewithJavaScriptDo...WhileLoops.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/100-IteratewithJavaScriptDo...WhileLoops.js similarity index 100% rename from Basic-JavaScript/100-IteratewithJavaScriptDo...WhileLoops.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/100-IteratewithJavaScriptDo...WhileLoops.js diff --git a/Basic-JavaScript/101-ReplaceLoopsusingRecursion.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/101-ReplaceLoopsusingRecursion.js similarity index 100% rename from Basic-JavaScript/101-ReplaceLoopsusingRecursion.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/101-ReplaceLoopsusingRecursion.js diff --git a/Basic-JavaScript/102-ProfileLookup.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/102-ProfileLookup.js similarity index 100% rename from Basic-JavaScript/102-ProfileLookup.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/102-ProfileLookup.js diff --git a/Basic-JavaScript/103-GenerateRandomFractionswithJavaScript.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/103-GenerateRandomFractionswithJavaScript.js similarity index 100% rename from Basic-JavaScript/103-GenerateRandomFractionswithJavaScript.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/103-GenerateRandomFractionswithJavaScript.js diff --git a/Basic-JavaScript/104-GenerateRandomWholeNumberswithJavaScript.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/104-GenerateRandomWholeNumberswithJavaScript.js similarity index 100% rename from Basic-JavaScript/104-GenerateRandomWholeNumberswithJavaScript.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/104-GenerateRandomWholeNumberswithJavaScript.js diff --git a/Basic-JavaScript/105-GenerateRandomWholeNumberswithinaRange.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/105-GenerateRandomWholeNumberswithinaRange.js similarity index 100% rename from Basic-JavaScript/105-GenerateRandomWholeNumberswithinaRange.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/105-GenerateRandomWholeNumberswithinaRange.js diff --git a/Basic-JavaScript/106-UsetheparseIntFunction.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/106-UsetheparseIntFunction.js similarity index 100% rename from Basic-JavaScript/106-UsetheparseIntFunction.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/106-UsetheparseIntFunction.js diff --git a/Basic-JavaScript/107-UsetheparseIntFunctionwithaRadix.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/107-UsetheparseIntFunctionwithaRadix.js similarity index 100% rename from Basic-JavaScript/107-UsetheparseIntFunctionwithaRadix.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/107-UsetheparseIntFunctionwithaRadix.js diff --git a/Basic-JavaScript/108-UsetheConditional(Ternary)Operator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/108-UsetheConditional(Ternary)Operator.js similarity index 100% rename from Basic-JavaScript/108-UsetheConditional(Ternary)Operator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/108-UsetheConditional(Ternary)Operator.js diff --git a/Basic-JavaScript/109-UsetheConditional(Ternary)Operator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/109-UsetheConditional(Ternary)Operator.js similarity index 100% rename from Basic-JavaScript/109-UsetheConditional(Ternary)Operator.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/109-UsetheConditional(Ternary)Operator.js diff --git a/Basic-JavaScript/110-UseRecursiontoCreateaCountdown.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/110-UseRecursiontoCreateaCountdown.js similarity index 100% rename from Basic-JavaScript/110-UseRecursiontoCreateaCountdown.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/110-UseRecursiontoCreateaCountdown.js diff --git a/Basic-JavaScript/111-UseRecursiontoCreateaRangeofNumbers.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/111-UseRecursiontoCreateaRangeofNumbers.js similarity index 100% rename from Basic-JavaScript/111-UseRecursiontoCreateaRangeofNumbers.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/111-UseRecursiontoCreateaRangeofNumbers.js diff --git a/Basic-JavaScript/112-DeclareaReadOnlyVariablewiththeconstKeyword.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/112-DeclareaReadOnlyVariablewiththeconstKeyword.js similarity index 100% rename from Basic-JavaScript/112-DeclareaReadOnlyVariablewiththeconstKeyword.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/112-DeclareaReadOnlyVariablewiththeconstKeyword.js diff --git a/Basic-JavaScript/113-ExploreDifferencesBetweenthevarandletKeywords.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/113-ExploreDifferencesBetweenthevarandletKeywords.js similarity index 100% rename from Basic-JavaScript/113-ExploreDifferencesBetweenthevarandletKeywords.js rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/113-ExploreDifferencesBetweenthevarandletKeywords.js diff --git a/Basic-JavaScript/rename.sh b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/rename.sh similarity index 100% rename from Basic-JavaScript/rename.sh rename to JavaScript Algorithms and Data Structures/01-Basic-JavaScript/rename.sh From 2b20fc0c0573847e2877a77e59ab27cdde64105e Mon Sep 17 00:00:00 2001 From: Yasholo Date: Wed, 13 Sep 2023 15:25:44 +0530 Subject: [PATCH 2/7] Re-organised files and folders --- ...opes-of-the-var-and-let-Keywords_script.js | 9 -- ...ate-an-Array-Declared-with-const_script.js | 9 -- .../03.Prevent-Object-Mutation_script.js | 13 -- ...rite-Concise-Anonymous-Functions_script.js | 3 - ...-Arrow-Functions-with-Parameters_script.js | 5 - ...lt-Parameters-for-Your-Functions_script.js | 1 - ...rameter-with-Function-Parameters_script.js | 4 - ...ator-to-Evaluate-Arrays-In-Place_script.js | 6 - ...t-to-Extract-Values-from-Objects_script.js | 8 -- ...to-Assign-Variables-from-Objects_script.js | 8 -- ...gn-Variables-from-Nested-Objects_script.js | 8 -- ...-to-Assign-Variables-from-Arrays_script.js | 2 - ...meter-to-Reassign-Array-Elements_script.js | 7 - ...bject-as-a-Function's-Parameters_script.js | 11 -- ...-Strings-using-Template-Literals_script.js | 15 -- ...-Using-Object-Property-Shorthand_script.js | 1 - ...e-Declarative-Functions-with-ES6_script.js | 8 -- ...to-Define-a-Constructor-Function_script.js | 8 -- ...s-to-Control-Access-to-an-Object_script.js | 13 -- .../20.Create-a-Module-Script_index.html | 5 - ...Use-export-to-Share-a-Code-Block_script.js | 7 - ...use-JavaScript-Code-Using-import_script.js | 5 - ...to-Import-Everything-from-a-File_script.js | 4 - ...ort-Fallback-with-export-default_script.js | 3 - .../25.Import-a-Default-Export_script.js | 3 - .../26.Create-a-JavaScript-Promise_script.js | 3 - ...-Promise-with-resolve-and-reject_script.js | 9 -- ...le-a-Fulfilled-Promise-with-then_script.js | 14 -- ...le-a-Rejected-Promise-with-catch_script.js | 14 -- .../02-ES6/moverenamefile.sh | 16 --- .../01.Using-the-Test-Method_script.js | 3 - .../02.Match-Literal-Strings_script.js | 3 - ...ing-with-Different-Possibilities_script.js | 3 - .../04.Ignore-Case-While-Matching_script.js | 3 - .../05.Extract-Matches_script.js | 3 - ...6.Find-More-Than-the-First-Match_script.js | 3 - .../07.Match-with-Wildcard-Period_script.js | 3 - ...ngle-with-Multiple-Possibilities_script.js | 3 - ...09.Match-Letters-of-the-Alphabet_script.js | 3 - ...bers-and-Letters-of-the-Alphabet_script.js | 3 - ...-Single-Characters-Not-Specified_script.js | 3 - ...ers-that-Occur-One-or-More-Times_script.js | 3 - ...rs-that-Occur-Zero-or-More-Times_script.js | 3 - ...nd-Characters-with-Lazy-Matching_script.js | 3 - ...-One-or-More-Criminals-in-a-Hunt_script.js | 1 - ....Match-Beginning-String-Patterns_script.js | 3 - .../17.Match-Ending-String-Patterns_script.js | 3 - ...18.Match-All-Letters-and-Numbers_script.js | 3 - .../20.Match-All-Numbers_script.js | 3 - .../21.Match-All-Non-Numbers_script.js | 3 - .../22.Restrict-Possible-Usernames_script.js | 3 - .../23.Match-Whitespace_script.js | 3 - ....Match-Non-Whitespace-Characters_script.js | 3 - ...pper-and-Lower-Number-of-Matches_script.js | 3 - ...Only-the-Lower-Number-of-Matches_script.js | 3 - ....Specify-Exact-Number-of-Matches_script.js | 3 - .../28.Check-for-All-or-None_script.js | 3 - ....Positive-and-Negative-Lookahead_script.js | 3 - ...For-Mixed-Grouping-of-Characters_script.js | 3 - ...se-Patterns-Using-Capture-Groups_script.js | 3 - ...ure-Groups-to-Search-and-Replace_script.js | 4 - ...ve-Whitespace-from-Start-and-End_script.js | 3 - ...erything-But-Letters-and-Numbers_script.js | 3 - ...to-Check-the-Value-of-a-Variable_script.js | 7 - ...freeCodeCamp-and-Browser-Console_script.js | 3 - ...-to-Check-the-Type-of-a-Variable_script.js | 5 - ...lled-Variable-and-Function-Names_script.js | 4 - ...heses-Brackets-Braces-and-Quotes_script.js | 3 - ...sage-of-Single-and-Double-Quotes_script.js | 2 - ...tor-Instead-of-Equality-Operator_script.js | 7 - ...arenthesis-After-a-Function-Call_script.js | 8 -- ...ng-Order-When-Calling-a-Function_script.js | 8 -- ...y-One-Errors-When-Using-Indexing_script.js | 9 -- ...ializing-Variables-Inside-a-Loop_script.js | 16 --- ...-with-a-Valid-Terminal-Condition_script.js | 5 - ...ay-to-Store-a-Collection-of-Data_script.js | 1 - ...n-Array-s-Using-Bracket-Notation_script.js | 3 - ...-Array-with-push()-and-unshift()_script.js | 7 - ...-an-Array-with-pop()-and-shift()_script.js | 7 - .../05.Remove-Items-Using-splice()_script.js | 4 - .../06.Add-Items-Using-splice()_script.js | 6 - ...7.Copy-Array-Items-Using-slice()_script.js | 6 - ...n-Array-with-the-Spread-Operator_script.js | 10 -- ...-Arrays-with-the-Spread-Operator_script.js | 8 -- ...nce-of-an-Element-With-indexOf()_script.js | 5 - ...an-Array's-Items-Using-For-Loops_script.js | 12 -- ...complex-multi-dimensional-arrays_script.js | 7 - ...alue-Pairs-to-JavaScript-Objects_script.js | 11 -- ...n-Object-Nested-Within-an-Object_script.js | 12 -- ...erty-Names-with-Bracket-Notation_script.js | 14 -- ...word-to-Remove-Object-Properties_script.js | 14 -- ...heck-if-an-Object-has-a-Property_script.js | 30 ---- ...n Object-with-a-for-in-Statement_script.js | 9 -- ...l-Object-Keys-with-Object.keys()_script.js | 24 ---- ...ify-an-Array-Stored-in-an-Object_script.js | 22 --- ...01.Convert-Celsius-to-Fahrenheit_script.js | 6 - .../02.Reverse-a-String_script.js | 9 -- .../03.Factorialize-a-Number_script.js | 12 -- ...ind-the-Longest-Word-in-a-String_script.js | 15 -- ...Return-Largest-Numbers-in-Arrays_script.js | 16 --- .../06.Confirm-the-Ending_script.js | 7 - ....Repeat-a-String-Repeat-a-String_script.js | 9 -- .../08.Truncate-a-String_script.js | 5 - .../09.Finders-Keepers_script.js | 12 -- .../10.Boo-who_script.js | 5 - .../11.Title-Case-a-Sentence_script.js | 8 -- .../12.Slice-and-Splice_script.js | 8 -- .../13.Falsy-Bouncer_script.js | 7 - .../14.Where-do-I-Belong_script.js | 10 -- .../15.Mutations_script.js | 8 -- .../16.Chunky-Monkey_script.js | 16 --- ...Create-a-Basic-JavaScript-Object_script.js | 4 - ...cess-the-Properties-of-an-Object_script.js | 6 - .../03.Create-a-Method-on-an-Object_script.js | 9 -- ...e-Reusable-with-the-this-Keyword_script.js | 9 -- ...05.Define-a-Constructor-Function_script.js | 5 - ...-a-Constructor-to-Create-Objects_script.js | 7 - ...onstructors-to-Receive-Arguments_script.js | 6 - ...ct's-Constructor-with-instanceof_script.js | 7 - .../09.Understand-Own-Properties_script.js | 13 -- ...perties-to-Reduce-Duplicate-Code_script.js | 6 - .../11.Iterate-Over-All-Properties_script.js | 19 --- ...erstand-the-Constructor-Property_script.js | 7 - ...ge-the-Prototype-to-a-New-Object_script.js | 13 -- ...erty-when-Changing-the-Prototype_script.js | 14 -- ...2\200\231s-Prototype-Comes-From_script.js" | 7 - ...6.Understand-the-Prototype-Chain_script.js | 8 -- ...nce-So-You-Don't-Repeat-Yourself_script.js | 24 ---- ...herit-Behaviors-from-a-Supertype_script.js | 11 -- ...ype-to-an-Instance-of-the-Parent_script.js | 13 -- ...n-Inherited-Constructor-Property_script.js | 12 -- ...21.Add-Methods-After-Inheritance_script.js | 14 -- .../22.Override-Inherited-Methods_script.js | 16 --- ...havior-Between-Unrelated-Objects_script.js | 17 --- ...t-from-Being-Modified-Externally_script.js | 7 - ...voked-Function-Expression-(IIFE)_script.js | 4 - ...6.Use-an-IIFE-to-Create-a-Module_script.js | 14 -- .../01.Learn-About-Functional-Programming.js | 13 -- ...tand-Functional-Programming-Terminology.js | 18 --- ...nd-the-Hazards-of-Using-Imperative-Code.js | 44 ------ ...de-Effects-Using-Functional-Programming.js | 5 - ...Avoid-External-Dependence-in-a-Function.js | 5 - ...actor-Global-Variables-Out-of-Functions.js | 22 --- ...ap-Method-to-Extract-Data-from-an-Array.js | 126 ----------------- .../08.Implement-map-on-a-Prototype.js | 14 -- ...er-Method-to-Extract-Data-from-an-Array.js | 126 ----------------- ...lement-the-filter-Method-on-a-Prototype.js | 16 --- ...Part-of-an-Array-Using-the-slice-Method.js | 6 - ...-an-Array-Using-slice-Instead-of-splice.js | 6 - ...bine-Two-Arrays-Using-the-concat-Method.js | 7 - ...f-an-Array-Using-concat-Instead-of-push.js | 7 - ...5.Use-the-reduce-Method-to-Analyze-Data.js | 131 ------------------ ...er-or-reduce-to-Solve-a-Complex-Problem.js | 8 -- ...ay-Alphabetically-using-the-sort-Method.js | 5 - ...ray-Without-Changing-the-Original-Array.js | 7 - ...ng-into-an-Array-Using-the-split-Method.js | 5 - ...ray-into-a-String-Using-the-join-Method.js | 5 - ...ramming-to-Convert-Strings-to-URL-Slugs.js | 4 - ...ry-Element-in-an-Array-Meets-a-Criteria.js | 5 - ...ny-Elements-in-an-Array-Meet-a-Criteria.js | 5 - ...ion-to-Currying-and-Partial-Application.js | 9 -- .../01.Sum-All-Numbers-in-a-Range.js | 20 --- .../02.Diff-Two-Arrays.js | 7 - .../03.Seek-and-Destroy.js | 8 -- .../04.Where-art-thou.js | 11 -- .../05.Spinal-Tap-Case.js | 8 -- .../06.Pig-Latin.js | 7 - .../07.Search-and-Replace.js | 10 -- .../08.DNA-Pairing.js | 12 -- .../09.Missing-letters.js | 11 -- .../10.Sorted-Union.js | 15 -- .../11.Convert-HTML-Entities.js | 29 ---- .../12.Sum-All-Odd-Fibonacci-Numbers.js | 15 -- .../13.Sum-All-Primes.js | 21 --- .../14.Smallest-Common-Multiple.js | 16 --- .../15.Drop-it.js | 10 -- .../16.Steamroller.js | 17 --- .../17.Binary-Agents.js | 12 -- .../18.Everything-Be-True.js | 5 - .../19.Arguments-Optional.js | 23 --- .../20.Make-a-Person.js | 30 ---- .../21.Map-the-Debris.js | 20 --- .../Caesars-Cipher.js | 23 --- .../Cash-Register.js | 62 --------- .../Palindrome-Checker.js | 15 -- .../Roman-Numeral-Converter.js | 60 -------- .../Telephone-Number-Validator.js | 10 -- 187 files changed, 2110 deletions(-) delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/01.Compare-Scopes-of-the-var-and-let-Keywords_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/02.Mutate-an-Array-Declared-with-const_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/03.Prevent-Object-Mutation_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/04.Use-Arrow-Functions-to-Write-Concise-Anonymous-Functions_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/05.Write-Arrow-Functions-with-Parameters_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/06.Set-Default-Parameters-for-Your-Functions_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/07.Use-the-Rest-Parameter-with-Function-Parameters_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/08.Use-the-Spread-Operator-to-Evaluate-Arrays-In-Place_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/09.Use-Destructuring-Assignment-to-Extract-Values-from-Objects_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/10.Use-Destructuring-Assignment-to-Assign-Variables-from-Objects_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/11.Use-Destructuring-Assignment to-Assign-Variables-from-Nested-Objects_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/12.Use-Destructuring-Assignment-to-Assign-Variables-from-Arrays_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/13.Use-Destructuring-Assignment-with-the-Rest-Parameter-to-Reassign-Array-Elements_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/14.Use-Destructuring-Assignment-to-Pass-an-Object-as-a-Function's-Parameters_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/15.Create-Strings-using-Template-Literals_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/16.Write-Concise-Object-Literal-Declarations-Using-Object-Property-Shorthand_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/17.Write-Concise-Declarative-Functions-with-ES6_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/18.Use-class-Syntax-to-Define-a-Constructor-Function_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/19.Use-getters-and-setters-to-Control-Access-to-an-Object_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/20.Create-a-Module-Script_index.html delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/21.Use-export-to-Share-a-Code-Block_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/22.Reuse-JavaScript-Code-Using-import_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/23.Use-to-Import-Everything-from-a-File_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/24.Create-an-Export-Fallback-with-export-default_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/25.Import-a-Default-Export_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/26.Create-a-JavaScript-Promise_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/27.Complete-a-Promise-with-resolve-and-reject_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/28.Handle-a-Fulfilled-Promise-with-then_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/29.Handle-a-Rejected-Promise-with-catch_script.js delete mode 100755 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/moverenamefile.sh delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/01.Using-the-Test-Method_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/02.Match-Literal-Strings_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/03.Match-a-Literal-String-with-Different-Possibilities_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/04.Ignore-Case-While-Matching_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/05.Extract-Matches_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/06.Find-More-Than-the-First-Match_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/07.Match-with-Wildcard-Period_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/08.Match-Single-with-Multiple-Possibilities_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/09.Match-Letters-of-the-Alphabet_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/10.Match-Numbers-and-Letters-of-the-Alphabet_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/11.Match-Single-Characters-Not-Specified_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/12.Match-Characters-that-Occur-One-or-More-Times_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/13.Match-Characters-that-Occur-Zero-or-More-Times_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/14.Find-Characters-with-Lazy-Matching_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/15.Find-One-or-More-Criminals-in-a-Hunt_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/16.Match-Beginning-String-Patterns_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/17.Match-Ending-String-Patterns_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/18.Match-All-Letters-and-Numbers_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/20.Match-All-Numbers_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/21.Match-All-Non-Numbers_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/22.Restrict-Possible-Usernames_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/23.Match-Whitespace_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/24.Match-Non-Whitespace-Characters_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/25.Specify Upper-and-Lower-Number-of-Matches_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/26.Specify-Only-the-Lower-Number-of-Matches_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/27.Specify-Exact-Number-of-Matches_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/28.Check-for-All-or-None_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/29.Positive-and-Negative-Lookahead_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/30.Check-For-Mixed-Grouping-of-Characters_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/31.Reuse-Patterns-Using-Capture-Groups_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/32.Use-Capture-Groups-to-Search-and-Replace_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/33.Remove-Whitespace-from-Start-and-End_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/Match Everything-But-Letters-and-Numbers_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/01.Use-the-JavaScript-Console-to-Check-the-Value-of-a-Variable_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/02.Understanding-the-Differences-between-the-freeCodeCamp-and-Browser-Console_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/03.Use-typeof-to-Check-the-Type-of-a-Variable_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/04.Catch-Misspelled-Variable-and-Function-Names_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/05.Catch-Unclosed-Parentheses-Brackets-Braces-and-Quotes_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/06.Catch-Mixed-Usage-of-Single-and-Double-Quotes_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/07.Catch-Use-of-Assignment-Operator-Instead-of-Equality-Operator_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/08.Catch-Missing-Open-and-Closing-Parenthesis-After-a-Function-Call_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/09.Catch-Arguments-Passed-in-the-Wrong-Order-When-Calling-a-Function_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/10.Catch-Off-By-One-Errors-When-Using-Indexing_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/11.Use-Caution-When-Reinitializing-Variables-Inside-a-Loop_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/12.Prevent-Infinite-Loops-with-a-Valid-Terminal-Condition_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/01.Use-an-Array-to-Store-a-Collection-of-Data_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/02.Access-an-Array-s-Using-Bracket-Notation_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/03.Add-Items-to-an-Array-with-push()-and-unshift()_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/04.Remove-Items-from-an-Array-with-pop()-and-shift()_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/05.Remove-Items-Using-splice()_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/06.Add-Items-Using-splice()_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/07.Copy-Array-Items-Using-slice()_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/08.Copy-an-Array-with-the-Spread-Operator_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/09.Combine-Arrays-with-the-Spread-Operator_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/10.Check-For-The-Presence-of-an-Element-With-indexOf()_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/11.Iterate-Through-All-an-Array's-Items-Using-For-Loops_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/12.Create-complex-multi-dimensional-arrays_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/13.Add-Key-Value-Pairs-to-JavaScript-Objects_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/14.Modify-an-Object-Nested-Within-an-Object_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/15.Access-Property-Names-with-Bracket-Notation_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/16.Use-the-delete-Keyword-to-Remove-Object-Properties_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/17.Check-if-an-Object-has-a-Property_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/18.Iterate-Through-the-Keys-of-an Object-with-a-for-in-Statement_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/19.Generate-an-Array-of-All-Object-Keys-with-Object.keys()_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/20.Modify-an-Array-Stored-in-an-Object_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/01.Convert-Celsius-to-Fahrenheit_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/02.Reverse-a-String_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/03.Factorialize-a-Number_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/04.Find-the-Longest-Word-in-a-String_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/05.Return-Largest-Numbers-in-Arrays_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/06.Confirm-the-Ending_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/07.Repeat-a-String-Repeat-a-String_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/08.Truncate-a-String_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/09.Finders-Keepers_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/10.Boo-who_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/11.Title-Case-a-Sentence_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/12.Slice-and-Splice_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/13.Falsy-Bouncer_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/14.Where-do-I-Belong_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/15.Mutations_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/16.Chunky-Monkey_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/01.Create-a-Basic-JavaScript-Object_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/02.Use-Dot-Notation-to-Access-the-Properties-of-an-Object_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/03.Create-a-Method-on-an-Object_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/04.Make-Code-More-Reusable-with-the-this-Keyword_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/05.Define-a-Constructor-Function_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/06.Use-a-Constructor-to-Create-Objects_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/07.Extend-Constructors-to-Receive-Arguments_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/08.Verify-an-Object's-Constructor-with-instanceof_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/09.Understand-Own-Properties_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/10.Use-Prototype-Properties-to-Reduce-Duplicate-Code_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/11.Iterate-Over-All-Properties_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/12.Understand-the-Constructor-Property_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/13.Change-the-Prototype-to-a-New-Object_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/14.Remember-to-Set-the-Constructor-Property-when-Changing-the-Prototype_script.js delete mode 100644 "JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/15.Understand-Where-an-Object\342\200\231s-Prototype-Comes-From_script.js" delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/16.Understand-the-Prototype-Chain_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/17.Use-Inheritance-So-You-Don't-Repeat-Yourself_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/18.Inherit-Behaviors-from-a-Supertype_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/19.Set-the-Child's-Prototype-to-an-Instance-of-the-Parent_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/20.Reset-an-Inherited-Constructor-Property_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/21.Add-Methods-After-Inheritance_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/22.Override-Inherited-Methods_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/23.Use-a-Mixin-to-Add-Common-Behavior-Between-Unrelated-Objects_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/24.Use-Closure-to-Protect-Properties-Within-an-Object-from-Being-Modified-Externally_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/25.Understand-the-Immediately-Invoked-Function-Expression-(IIFE)_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/26.Use-an-IIFE-to-Create-a-Module_script.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/01.Learn-About-Functional-Programming.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/02.Understand-Functional-Programming-Terminology.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/03.Understand-the-Hazards-of-Using-Imperative-Code.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/04.Avoid-Mutations-and-Side-Effects-Using-Functional-Programming.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/05.Pass-Arguments-to-Avoid-External-Dependence-in-a-Function.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/06.Refactor-Global-Variables-Out-of-Functions.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/07.Use-the-map-Method-to-Extract-Data-from-an-Array.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/08.Implement-map-on-a-Prototype.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/09.Use-the-filter-Method-to-Extract-Data-from-an-Array.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/10.Implement-the-filter-Method-on-a-Prototype.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/11.Return-Part-of-an-Array-Using-the-slice-Method.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/12.Remove-Elements-from-an-Array-Using-slice-Instead-of-splice.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/13.Combine-Two-Arrays-Using-the-concat-Method.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/14.Add-Elements-to-the-End-of-an-Array-Using-concat-Instead-of-push.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/15.Use-the-reduce-Method-to-Analyze-Data.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/16.Use-Higher-Order-Functions-map-filter-or-reduce-to-Solve-a-Complex-Problem.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/17.Sort-an-Array-Alphabetically-using-the-sort-Method.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/18.Return-a-Sorted-Array-Without-Changing-the-Original-Array.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/19.Split-a-String-into-an-Array-Using-the-split-Method.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/20.Combine-an-Array-into-a-String-Using-the-join-Method.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/21.Apply-Functional-Programming-to-Convert-Strings-to-URL-Slugs.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/22.Use-the-every-Method-to-Check-that-Every-Element-in-an-Array-Meets-a-Criteria.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/23.Use-the-some-Method-to-Check-that-Any-Elements-in-an-Array-Meet-a-Criteria.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/24.Introduction-to-Currying-and-Partial-Application.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/01.Sum-All-Numbers-in-a-Range.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/02.Diff-Two-Arrays.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/03.Seek-and-Destroy.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/04.Where-art-thou.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/05.Spinal-Tap-Case.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/06.Pig-Latin.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/07.Search-and-Replace.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/08.DNA-Pairing.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/09.Missing-letters.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/10.Sorted-Union.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/11.Convert-HTML-Entities.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/12.Sum-All-Odd-Fibonacci-Numbers.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/13.Sum-All-Primes.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/14.Smallest-Common-Multiple.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/15.Drop-it.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/16.Steamroller.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/17.Binary-Agents.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/18.Everything-Be-True.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/19.Arguments-Optional.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/20.Make-a-Person.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/21.Map-the-Debris.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Caesars-Cipher.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Cash-Register.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Palindrome-Checker.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Roman-Numeral-Converter.js delete mode 100644 JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Telephone-Number-Validator.js diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/01.Compare-Scopes-of-the-var-and-let-Keywords_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/01.Compare-Scopes-of-the-var-and-let-Keywords_script.js deleted file mode 100644 index da24a2f..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/01.Compare-Scopes-of-the-var-and-let-Keywords_script.js +++ /dev/null @@ -1,9 +0,0 @@ -function checkScope() { - let i = 'function scope'; - if (true) { - let i = 'block scope'; - console.log('Block scope i is: ', i); - } - console.log('Function scope i is: ', i); - return i; - } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/02.Mutate-an-Array-Declared-with-const_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/02.Mutate-an-Array-Declared-with-const_script.js deleted file mode 100644 index 9bea0a7..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/02.Mutate-an-Array-Declared-with-const_script.js +++ /dev/null @@ -1,9 +0,0 @@ -const s = [5, 7, 2]; -function editInPlace() { - -s[0] = 2; -s[1] = 5; -s[2] = 7; -console.log(s); -} -editInPlace(); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/03.Prevent-Object-Mutation_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/03.Prevent-Object-Mutation_script.js deleted file mode 100644 index bdc5a1c..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/03.Prevent-Object-Mutation_script.js +++ /dev/null @@ -1,13 +0,0 @@ -function freezeObj() { - const MATH_CONSTANTS = { - PI: 3.14 - }; - Object.freeze(MATH_CONSTANTS); - try { - MATH_CONSTANTS.PI = 99; - } catch(ex) { - console.log(ex); - } - return MATH_CONSTANTS.PI; - } - const PI = freezeObj(); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/04.Use-Arrow-Functions-to-Write-Concise-Anonymous-Functions_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/04.Use-Arrow-Functions-to-Write-Concise-Anonymous-Functions_script.js deleted file mode 100644 index ac3a7ea..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/04.Use-Arrow-Functions-to-Write-Concise-Anonymous-Functions_script.js +++ /dev/null @@ -1,3 +0,0 @@ -const magic = () => { - return new Date(); - }; \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/05.Write-Arrow-Functions-with-Parameters_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/05.Write-Arrow-Functions-with-Parameters_script.js deleted file mode 100644 index ebcecc7..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/05.Write-Arrow-Functions-with-Parameters_script.js +++ /dev/null @@ -1,5 +0,0 @@ -const myConcat = (arr1, arr2) => { - return arr1.concat(arr2); - }; - - console.log(myConcat([1, 2], [3, 4, 5])); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/06.Set-Default-Parameters-for-Your-Functions_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/06.Set-Default-Parameters-for-Your-Functions_script.js deleted file mode 100644 index a06e510..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/06.Set-Default-Parameters-for-Your-Functions_script.js +++ /dev/null @@ -1 +0,0 @@ -const increment = (number, value = 1) => number + value; diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/07.Use-the-Rest-Parameter-with-Function-Parameters_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/07.Use-the-Rest-Parameter-with-Function-Parameters_script.js deleted file mode 100644 index bcbe40f..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/07.Use-the-Rest-Parameter-with-Function-Parameters_script.js +++ /dev/null @@ -1,4 +0,0 @@ -const sum = (...args) => { - return args.reduce((a, b) => a + b, 0); - } - \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/08.Use-the-Spread-Operator-to-Evaluate-Arrays-In-Place_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/08.Use-the-Spread-Operator-to-Evaluate-Arrays-In-Place_script.js deleted file mode 100644 index 82029e4..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/08.Use-the-Spread-Operator-to-Evaluate-Arrays-In-Place_script.js +++ /dev/null @@ -1,6 +0,0 @@ -const arr1 = ['JAN', 'FEB', 'MAR', 'APR', 'MAY']; -let arr2; - -arr2 = [...arr1]; - -console.log(arr2); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/09.Use-Destructuring-Assignment-to-Extract-Values-from-Objects_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/09.Use-Destructuring-Assignment-to-Extract-Values-from-Objects_script.js deleted file mode 100644 index fc6a038..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/09.Use-Destructuring-Assignment-to-Extract-Values-from-Objects_script.js +++ /dev/null @@ -1,8 +0,0 @@ -const HIGH_TEMPERATURES = { - yesterday: 75, - today: 77, - tomorrow: 80 - }; - - const {today, tomorrow} = HIGH_TEMPERATURES; - \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/10.Use-Destructuring-Assignment-to-Assign-Variables-from-Objects_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/10.Use-Destructuring-Assignment-to-Assign-Variables-from-Objects_script.js deleted file mode 100644 index 8ca971c..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/10.Use-Destructuring-Assignment-to-Assign-Variables-from-Objects_script.js +++ /dev/null @@ -1,8 +0,0 @@ -const HIGH_TEMPERATURES = { - yesterday: 75, - today: 77, - tomorrow: 80 - }; - - const { today: highToday, tomorrow: highTomorrow } = HIGH_TEMPERATURES; - \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/11.Use-Destructuring-Assignment to-Assign-Variables-from-Nested-Objects_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/11.Use-Destructuring-Assignment to-Assign-Variables-from-Nested-Objects_script.js deleted file mode 100644 index 797e5d4..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/11.Use-Destructuring-Assignment to-Assign-Variables-from-Nested-Objects_script.js +++ /dev/null @@ -1,8 +0,0 @@ -const LOCAL_FORECAST = { - yesterday: { low: 61, high: 75 }, - today: { low: 64, high: 77 }, - tomorrow: { low: 68, high: 80 } - }; - - const { today: { low: lowToday, high: highToday }} = LOCAL_FORECAST; - \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/12.Use-Destructuring-Assignment-to-Assign-Variables-from-Arrays_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/12.Use-Destructuring-Assignment-to-Assign-Variables-from-Arrays_script.js deleted file mode 100644 index 6061223..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/12.Use-Destructuring-Assignment-to-Assign-Variables-from-Arrays_script.js +++ /dev/null @@ -1,2 +0,0 @@ -let a = 8, b = 6; -[a, b] = [b, a]; \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/13.Use-Destructuring-Assignment-with-the-Rest-Parameter-to-Reassign-Array-Elements_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/13.Use-Destructuring-Assignment-with-the-Rest-Parameter-to-Reassign-Array-Elements_script.js deleted file mode 100644 index 09fc9ef..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/13.Use-Destructuring-Assignment-with-the-Rest-Parameter-to-Reassign-Array-Elements_script.js +++ /dev/null @@ -1,7 +0,0 @@ -const source = [1,2,3,4,5,6,7,8,9,10]; -function removeFirstTwo(list) { - - const [,,...arr] = list; - return arr; -} -const arr = removeFirstTwo(source); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/14.Use-Destructuring-Assignment-to-Pass-an-Object-as-a-Function's-Parameters_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/14.Use-Destructuring-Assignment-to-Pass-an-Object-as-a-Function's-Parameters_script.js deleted file mode 100644 index 69c5292..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/14.Use-Destructuring-Assignment-to-Pass-an-Object-as-a-Function's-Parameters_script.js +++ /dev/null @@ -1,11 +0,0 @@ -const stats = { - max: 56.78, - standard_deviation: 4.34, - median: 34.54, - mode: 23.87, - min: -0.75, - average: 35.85 - }; - - const half = ({ max, min }) => (max + min) / 2.0; - \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/15.Create-Strings-using-Template-Literals_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/15.Create-Strings-using-Template-Literals_script.js deleted file mode 100644 index 3bf931b..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/15.Create-Strings-using-Template-Literals_script.js +++ /dev/null @@ -1,15 +0,0 @@ -const result = { - success: ["max-length", "no-amd", "prefer-arrow-functions"], - failure: ["no-var", "var-on-top", "linebreak"], - skipped: ["no-extra-semi", "no-dup-keys"] - }; - function makeList(arr) { - const failureItems = []; - for (let i = 0; i < arr.length; i++) { - failureItems.push(`
  • ${arr[i]}
  • `); - } - - return failureItems; - } - - const failuresList = makeList(result.failure); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/16.Write-Concise-Object-Literal-Declarations-Using-Object-Property-Shorthand_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/16.Write-Concise-Object-Literal-Declarations-Using-Object-Property-Shorthand_script.js deleted file mode 100644 index 6604919..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/16.Write-Concise-Object-Literal-Declarations-Using-Object-Property-Shorthand_script.js +++ /dev/null @@ -1 +0,0 @@ -const createPerson = (name, age, gender) => ({name, age, gender}); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/17.Write-Concise-Declarative-Functions-with-ES6_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/17.Write-Concise-Declarative-Functions-with-ES6_script.js deleted file mode 100644 index b7e72be..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/17.Write-Concise-Declarative-Functions-with-ES6_script.js +++ /dev/null @@ -1,8 +0,0 @@ -const bicycle = { - gear: 2, - setGear(newGear) { - this.gear = newGear; - } - }; - bicycle.setGear(3); - console.log(bicycle.gear); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/18.Use-class-Syntax-to-Define-a-Constructor-Function_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/18.Use-class-Syntax-to-Define-a-Constructor-Function_script.js deleted file mode 100644 index f237421..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/18.Use-class-Syntax-to-Define-a-Constructor-Function_script.js +++ /dev/null @@ -1,8 +0,0 @@ -class Vegetable { - constructor(name) { - this.name = name; - } - } - - const carrot = new Vegetable('carrot'); - console.log(carrot.name); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/19.Use-getters-and-setters-to-Control-Access-to-an-Object_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/19.Use-getters-and-setters-to-Control-Access-to-an-Object_script.js deleted file mode 100644 index 3b73054..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/19.Use-getters-and-setters-to-Control-Access-to-an-Object_script.js +++ /dev/null @@ -1,13 +0,0 @@ -class Thermostat { - constructor(fahrenheit) { - this.fahrenheit = fahrenheit; - } - - get temperature() { - return (5 / 9) * (this.fahrenheit - 32); - } - - set temperature(celsius) { - this.fahrenheit = (celsius * 9.0) / 5 + 32; - } -} \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/20.Create-a-Module-Script_index.html b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/20.Create-a-Module-Script_index.html deleted file mode 100644 index 2034e05..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/20.Create-a-Module-Script_index.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/21.Use-export-to-Share-a-Code-Block_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/21.Use-export-to-Share-a-Code-Block_script.js deleted file mode 100644 index e100437..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/21.Use-export-to-Share-a-Code-Block_script.js +++ /dev/null @@ -1,7 +0,0 @@ -export const uppercaseString = (string) => { - return string.toUpperCase(); - } - - export const lowercaseString = (string) => { - return string.toLowerCase() - } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/22.Reuse-JavaScript-Code-Using-import_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/22.Reuse-JavaScript-Code-Using-import_script.js deleted file mode 100644 index 92f951e..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/22.Reuse-JavaScript-Code-Using-import_script.js +++ /dev/null @@ -1,5 +0,0 @@ -import { uppercaseString } from './string_functions.js'; -import { lowercaseString } from './string_functions.js'; - -uppercaseString("hello"); -lowercaseString("WORLD!"); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/23.Use-to-Import-Everything-from-a-File_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/23.Use-to-Import-Everything-from-a-File_script.js deleted file mode 100644 index e8ae9ba..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/23.Use-to-Import-Everything-from-a-File_script.js +++ /dev/null @@ -1,4 +0,0 @@ -import * as stringFunctions from "./string_functions.js"; - -stringFunctions.uppercaseString("hello"); -stringFunctions.lowercaseString("WORLD!"); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/24.Create-an-Export-Fallback-with-export-default_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/24.Create-an-Export-Fallback-with-export-default_script.js deleted file mode 100644 index fc0c2e9..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/24.Create-an-Export-Fallback-with-export-default_script.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function subtract(x, y) { - return x - y; - } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/25.Import-a-Default-Export_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/25.Import-a-Default-Export_script.js deleted file mode 100644 index 32d9e1d..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/25.Import-a-Default-Export_script.js +++ /dev/null @@ -1,3 +0,0 @@ -import subtract from "./math_functions.js"; - -subtract(7,4); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/26.Create-a-JavaScript-Promise_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/26.Create-a-JavaScript-Promise_script.js deleted file mode 100644 index b7839cf..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/26.Create-a-JavaScript-Promise_script.js +++ /dev/null @@ -1,3 +0,0 @@ -const makeServerRequest = new Promise((resolve, reject) => { - -}); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/27.Complete-a-Promise-with-resolve-and-reject_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/27.Complete-a-Promise-with-resolve-and-reject_script.js deleted file mode 100644 index f25e91a..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/27.Complete-a-Promise-with-resolve-and-reject_script.js +++ /dev/null @@ -1,9 +0,0 @@ -const makeServerRequest = new Promise((resolve, reject) => { - - let responseFromServer; - if(responseFromServer) { - resolve("We got the data"); - } else { - reject("Data not received"); - } - }); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/28.Handle-a-Fulfilled-Promise-with-then_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/28.Handle-a-Fulfilled-Promise-with-then_script.js deleted file mode 100644 index b5fa0db..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/28.Handle-a-Fulfilled-Promise-with-then_script.js +++ /dev/null @@ -1,14 +0,0 @@ -const makeServerRequest = new Promise((resolve, reject) => { - - let responseFromServer = true; - - if(responseFromServer) { - resolve("We got the data"); - } else { - reject("Data not received"); - } - }); - - makeServerRequest.then(result => { - console.log(result); - }); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/29.Handle-a-Rejected-Promise-with-catch_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/29.Handle-a-Rejected-Promise-with-catch_script.js deleted file mode 100644 index 6118e47..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/29.Handle-a-Rejected-Promise-with-catch_script.js +++ /dev/null @@ -1,14 +0,0 @@ -const makeServerRequest = new Promise((resolve, reject) => { - - let responseFromServer = false; - - if(responseFromServer) { - resolve("We got the data"); - } else { - reject("Data not received"); - } - }); - - makeServerRequest.catch(error => { - console.log(error ); - }); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/moverenamefile.sh b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/moverenamefile.sh deleted file mode 100755 index ed10760..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/02-ES6/moverenamefile.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Define the parent directory -parent_directory="/mnt/a57ccb77-a765-4dca-b87c-b337ac842dee/Sharedvm/FreeCodeCamp-JavaScript-Algorithms-and-Data-Structures/ES6" - -# Define the destination directory -destination_directory="/mnt/a57ccb77-a765-4dca-b87c-b337ac842dee/Sharedvm/FreeCodeCamp-JavaScript-Algorithms-and-Data-Structures/nf" - -# Iterate through directories in the parent directory -for dir in "$parent_directory"/*/; do - # Extract the directory name - dirname=$(basename "$dir") - - # Move files from each directory to the destination directory and rename them - find "$dir" -type f -exec bash -c 'mv "$1" "$2"/"$3_${1##*/}"' bash {} "$destination_directory" "$dirname" \; -done diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/01.Using-the-Test-Method_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/01.Using-the-Test-Method_script.js deleted file mode 100644 index 04effaf..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/01.Using-the-Test-Method_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let myString = "Hello, World!"; -let myRegex = /Hello/; -let result = myRegex.test(myString); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/02.Match-Literal-Strings_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/02.Match-Literal-Strings_script.js deleted file mode 100644 index 76b7ae8..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/02.Match-Literal-Strings_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let waldoIsHiding = "Somewhere Waldo is hiding in this text."; -let waldoRegex = /Waldo/; -let result = waldoRegex.test(waldoIsHiding); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/03.Match-a-Literal-String-with-Different-Possibilities_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/03.Match-a-Literal-String-with-Different-Possibilities_script.js deleted file mode 100644 index 9d0bbc3..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/03.Match-a-Literal-String-with-Different-Possibilities_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let petString = "James has a pet cat."; -let petRegex = /cat|dog|fish|bird/; -let result = petRegex.test(petString); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/04.Ignore-Case-While-Matching_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/04.Ignore-Case-While-Matching_script.js deleted file mode 100644 index 60a41e1..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/04.Ignore-Case-While-Matching_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let myString = "freeCodeCamp"; -let fccRegex = /freeCodeCamp/i; -let result = fccRegex.test(myString); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/05.Extract-Matches_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/05.Extract-Matches_script.js deleted file mode 100644 index bb6b00a..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/05.Extract-Matches_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let extractStr = "Extract the word 'coding' from this string."; -let codingRegex = /coding/; -let result = extractStr.match(codingRegex); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/06.Find-More-Than-the-First-Match_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/06.Find-More-Than-the-First-Match_script.js deleted file mode 100644 index 2e9f021..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/06.Find-More-Than-the-First-Match_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let twinkleStar = "Twinkle, twinkle, little star"; -let starRegex = /twinkle/ig; -let result = twinkleStar.match(starRegex); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/07.Match-with-Wildcard-Period_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/07.Match-with-Wildcard-Period_script.js deleted file mode 100644 index af092a4..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/07.Match-with-Wildcard-Period_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let exampleStr = "Let's have fun with regular expressions!"; -let unRegex = /.un/; -let result = unRegex.test(exampleStr); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/08.Match-Single-with-Multiple-Possibilities_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/08.Match-Single-with-Multiple-Possibilities_script.js deleted file mode 100644 index be76cd9..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/08.Match-Single-with-Multiple-Possibilities_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let quoteSample = "Beware of bugs in the above code; I have only proved it correct, not tried it."; -let vowelRegex = /[aeiou]/gi; -let result = quoteSample.match(vowelRegex); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/09.Match-Letters-of-the-Alphabet_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/09.Match-Letters-of-the-Alphabet_script.js deleted file mode 100644 index 136f59d..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/09.Match-Letters-of-the-Alphabet_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let quoteSample = "The quick brown fox jumps over the lazy dog."; -let alphabetRegex = /[a-z]/gi; -let result = quoteSample.match(alphabetRegex) \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/10.Match-Numbers-and-Letters-of-the-Alphabet_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/10.Match-Numbers-and-Letters-of-the-Alphabet_script.js deleted file mode 100644 index d9c3408..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/10.Match-Numbers-and-Letters-of-the-Alphabet_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let quoteSample = "Blueberry 3.141592653s are delicious."; -let myRegex = /[h-s2-6]/ig; -let result = quoteSample.match(myRegex); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/11.Match-Single-Characters-Not-Specified_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/11.Match-Single-Characters-Not-Specified_script.js deleted file mode 100644 index eb94001..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/11.Match-Single-Characters-Not-Specified_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let quoteSample = "3 blind mice."; -let myRegex = /[^aeiou0-9]/ig; -let result = quoteSample.match(myRegex); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/12.Match-Characters-that-Occur-One-or-More-Times_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/12.Match-Characters-that-Occur-One-or-More-Times_script.js deleted file mode 100644 index 480609b..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/12.Match-Characters-that-Occur-One-or-More-Times_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let difficultSpelling = "Mississippi"; -let myRegex = /s+/ig; -let result = difficultSpelling.match(myRegex); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/13.Match-Characters-that-Occur-Zero-or-More-Times_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/13.Match-Characters-that-Occur-Zero-or-More-Times_script.js deleted file mode 100644 index 5e5e3c3..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/13.Match-Characters-that-Occur-Zero-or-More-Times_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let chewieRegex = /A+a*/; - -let result = chewieQuote.match(chewieRegex); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/14.Find-Characters-with-Lazy-Matching_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/14.Find-Characters-with-Lazy-Matching_script.js deleted file mode 100644 index 2d9d8fb..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/14.Find-Characters-with-Lazy-Matching_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let text = "

    Winter is coming

    "; -let myRegex = /<.*?>/; -let result = text.match(myRegex); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/15.Find-One-or-More-Criminals-in-a-Hunt_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/15.Find-One-or-More-Criminals-in-a-Hunt_script.js deleted file mode 100644 index 79fe5eb..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/15.Find-One-or-More-Criminals-in-a-Hunt_script.js +++ /dev/null @@ -1 +0,0 @@ -let reCriminals = /C+/; \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/16.Match-Beginning-String-Patterns_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/16.Match-Beginning-String-Patterns_script.js deleted file mode 100644 index 6944360..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/16.Match-Beginning-String-Patterns_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let rickyAndCal = "Cal and Ricky both like racing."; -let calRegex = /^Cal/; -let result = calRegex.test(rickyAndCal); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/17.Match-Ending-String-Patterns_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/17.Match-Ending-String-Patterns_script.js deleted file mode 100644 index 88e3093..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/17.Match-Ending-String-Patterns_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let caboose = "The last car on a train is the caboose"; -let lastRegex = /caboose$/; -let result = lastRegex.test(caboose); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/18.Match-All-Letters-and-Numbers_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/18.Match-All-Letters-and-Numbers_script.js deleted file mode 100644 index 843b355..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/18.Match-All-Letters-and-Numbers_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let quoteSample = "The five boxing wizards jump quickly."; -let alphabetRegexV2 = /\w/g; -let result = quoteSample.match(alphabetRegexV2).length; \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/20.Match-All-Numbers_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/20.Match-All-Numbers_script.js deleted file mode 100644 index 346d5bc..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/20.Match-All-Numbers_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let movieName = "2001: A Space Odyssey"; -let numRegex = /\d/g; -let result = movieName.match(numRegex).length; \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/21.Match-All-Non-Numbers_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/21.Match-All-Non-Numbers_script.js deleted file mode 100644 index 4633194..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/21.Match-All-Non-Numbers_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let movieName = "2001: A Space Odyssey"; -let noNumRegex = /\D/g; -let result = movieName.match(noNumRegex).length; \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/22.Restrict-Possible-Usernames_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/22.Restrict-Possible-Usernames_script.js deleted file mode 100644 index 2006f81..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/22.Restrict-Possible-Usernames_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let username = "JackOfAllTrades"; -let userCheck = /^[a-z][a-z]+\d*$|^[a-z]\d\d+$/i; -let result = userCheck.test(username); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/23.Match-Whitespace_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/23.Match-Whitespace_script.js deleted file mode 100644 index 21c454a..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/23.Match-Whitespace_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let sample = "Whitespace is important in separating words"; -let countWhiteSpace = /\s/g; -let result = sample.match(countWhiteSpace); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/24.Match-Non-Whitespace-Characters_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/24.Match-Non-Whitespace-Characters_script.js deleted file mode 100644 index 631579b..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/24.Match-Non-Whitespace-Characters_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let sample = "Whitespace is important in separating words"; -let countNonWhiteSpace = /\S/g; -let result = sample.match(countNonWhiteSpace); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/25.Specify Upper-and-Lower-Number-of-Matches_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/25.Specify Upper-and-Lower-Number-of-Matches_script.js deleted file mode 100644 index 34d0bc0..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/25.Specify Upper-and-Lower-Number-of-Matches_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let ohStr = "Ohhh no"; -let ohRegex = /Oh{3,6}\sno/; -let result = ohRegex.test(ohStr); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/26.Specify-Only-the-Lower-Number-of-Matches_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/26.Specify-Only-the-Lower-Number-of-Matches_script.js deleted file mode 100644 index 7cb13f7..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/26.Specify-Only-the-Lower-Number-of-Matches_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let haStr = "Hazzzzah"; -let haRegex = /Haz{4,}ah/; -let result = haRegex.test(haStr); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/27.Specify-Exact-Number-of-Matches_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/27.Specify-Exact-Number-of-Matches_script.js deleted file mode 100644 index 40e58f0..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/27.Specify-Exact-Number-of-Matches_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let timStr = "Timmmmber"; -let timRegex = /Tim{4}ber/; -let result = timRegex.test(timStr); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/28.Check-for-All-or-None_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/28.Check-for-All-or-None_script.js deleted file mode 100644 index 7ca4872..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/28.Check-for-All-or-None_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let favWord = "favorite"; -let favRegex = /favou?rite/; -let result = favRegex.test(favWord); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/29.Positive-and-Negative-Lookahead_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/29.Positive-and-Negative-Lookahead_script.js deleted file mode 100644 index 64ef8bd..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/29.Positive-and-Negative-Lookahead_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let sampleWord = "astronaut"; -let pwRegex = /(?=\w{6})(?=\w*\d{2})/; -let result = pwRegex.test(sampleWord); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/30.Check-For-Mixed-Grouping-of-Characters_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/30.Check-For-Mixed-Grouping-of-Characters_script.js deleted file mode 100644 index dcdf490..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/30.Check-For-Mixed-Grouping-of-Characters_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let myString = "Eleanor Roosevelt"; -let myRegex = /(Franklin|Eleanor).*Roosevelt/; -let result = myRegex.test(myString); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/31.Reuse-Patterns-Using-Capture-Groups_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/31.Reuse-Patterns-Using-Capture-Groups_script.js deleted file mode 100644 index 51e6141..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/31.Reuse-Patterns-Using-Capture-Groups_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let repeatNum = "42 42 42"; -let reRegex = /^(\d+)\s\1\s\1$/; -let result = reRegex.test(repeatNum); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/32.Use-Capture-Groups-to-Search-and-Replace_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/32.Use-Capture-Groups-to-Search-and-Replace_script.js deleted file mode 100644 index 6d27690..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/32.Use-Capture-Groups-to-Search-and-Replace_script.js +++ /dev/null @@ -1,4 +0,0 @@ -let str = "one two three"; -let fixRegex = /(\w+)\s(\w+)\s(\w+)/; -let replaceText = "$3 $2 $1"; -let result = str.replace(fixRegex, replaceText); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/33.Remove-Whitespace-from-Start-and-End_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/33.Remove-Whitespace-from-Start-and-End_script.js deleted file mode 100644 index 4ae6932..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/33.Remove-Whitespace-from-Start-and-End_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let hello = " Hello, World! "; -let wsRegex = /^\s+|\s+$/g; -let result = hello.replace(wsRegex, ""); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/Match Everything-But-Letters-and-Numbers_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/Match Everything-But-Letters-and-Numbers_script.js deleted file mode 100644 index 1b4c83a..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/03-Regular-Expressions/Match Everything-But-Letters-and-Numbers_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let quoteSample = "The five boxing wizards jump quickly."; -let nonAlphabetRegex = /\W/g; -let result = quoteSample.match(nonAlphabetRegex).length; \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/01.Use-the-JavaScript-Console-to-Check-the-Value-of-a-Variable_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/01.Use-the-JavaScript-Console-to-Check-the-Value-of-a-Variable_script.js deleted file mode 100644 index bd4d997..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/01.Use-the-JavaScript-Console-to-Check-the-Value-of-a-Variable_script.js +++ /dev/null @@ -1,7 +0,0 @@ -let a = 5; -let b = 1; -a++; - - -let sumAB = a + b; -console.log(a); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/02.Understanding-the-Differences-between-the-freeCodeCamp-and-Browser-Console_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/02.Understanding-the-Differences-between-the-freeCodeCamp-and-Browser-Console_script.js deleted file mode 100644 index 2c83fa6..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/02.Understanding-the-Differences-between-the-freeCodeCamp-and-Browser-Console_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let output = "Get this to show once in the freeCodeCamp console and not at all in the browser console"; -console.log(output); -console.clear(); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/03.Use-typeof-to-Check-the-Type-of-a-Variable_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/03.Use-typeof-to-Check-the-Type-of-a-Variable_script.js deleted file mode 100644 index 486af3d..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/03.Use-typeof-to-Check-the-Type-of-a-Variable_script.js +++ /dev/null @@ -1,5 +0,0 @@ -let seven = 7; -let three = "3"; -console.log(seven + three); -console.log(typeof seven); -console.log(typeof three); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/04.Catch-Misspelled-Variable-and-Function-Names_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/04.Catch-Misspelled-Variable-and-Function-Names_script.js deleted file mode 100644 index f75b340..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/04.Catch-Misspelled-Variable-and-Function-Names_script.js +++ /dev/null @@ -1,4 +0,0 @@ -let receivables = 10; -let payables = 8; -let netWorkingCapital = receivables - payables; -console.log(`Net working capital is: ${netWorkingCapital}`); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/05.Catch-Unclosed-Parentheses-Brackets-Braces-and-Quotes_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/05.Catch-Unclosed-Parentheses-Brackets-Braces-and-Quotes_script.js deleted file mode 100644 index 5c5722a..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/05.Catch-Unclosed-Parentheses-Brackets-Braces-and-Quotes_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let myArray = [1, 2, 3]; - let arraySum = myArray.reduce((previous, current) => previous + current); - console.log(`Sum of array values is: ${arraySum}`); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/06.Catch-Mixed-Usage-of-Single-and-Double-Quotes_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/06.Catch-Mixed-Usage-of-Single-and-Double-Quotes_script.js deleted file mode 100644 index 13d9f57..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/06.Catch-Mixed-Usage-of-Single-and-Double-Quotes_script.js +++ /dev/null @@ -1,2 +0,0 @@ -let innerHtml = "

    Click here to return home

    "; -console.log(innerHtml); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/07.Catch-Use-of-Assignment-Operator-Instead-of-Equality-Operator_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/07.Catch-Use-of-Assignment-Operator-Instead-of-Equality-Operator_script.js deleted file mode 100644 index 169c7d1..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/07.Catch-Use-of-Assignment-Operator-Instead-of-Equality-Operator_script.js +++ /dev/null @@ -1,7 +0,0 @@ -let x = 7; -let y = 9; -let result = "to come"; - -result = x === y ? "Equl!" : "Not equal!" - -console.log(result); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/08.Catch-Missing-Open-and-Closing-Parenthesis-After-a-Function-Call_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/08.Catch-Missing-Open-and-Closing-Parenthesis-After-a-Function-Call_script.js deleted file mode 100644 index 28206d1..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/08.Catch-Missing-Open-and-Closing-Parenthesis-After-a-Function-Call_script.js +++ /dev/null @@ -1,8 +0,0 @@ -function getNine() { - let x = 6; - let y = 3; - return x + y; - } - - let result = getNine(); - console.log(result); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/09.Catch-Arguments-Passed-in-the-Wrong-Order-When-Calling-a-Function_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/09.Catch-Arguments-Passed-in-the-Wrong-Order-When-Calling-a-Function_script.js deleted file mode 100644 index 0415dcf..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/09.Catch-Arguments-Passed-in-the-Wrong-Order-When-Calling-a-Function_script.js +++ /dev/null @@ -1,8 +0,0 @@ -function raiseToPower(b, e) { - return Math.pow(b, e); - } - - let base = 2; - let exp = 3; - let power = raiseToPower(base, exp); - console.log(power); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/10.Catch-Off-By-One-Errors-When-Using-Indexing_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/10.Catch-Off-By-One-Errors-When-Using-Indexing_script.js deleted file mode 100644 index 3d51787..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/10.Catch-Off-By-One-Errors-When-Using-Indexing_script.js +++ /dev/null @@ -1,9 +0,0 @@ -function countToFive() { - let firstFive = "12345"; - let len = firstFive.length; - for (let i = 0; i < len; i++) { - console.log(firstFive[i]); - } - } - - countToFive(); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/11.Use-Caution-When-Reinitializing-Variables-Inside-a-Loop_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/11.Use-Caution-When-Reinitializing-Variables-Inside-a-Loop_script.js deleted file mode 100644 index 771c17d..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/11.Use-Caution-When-Reinitializing-Variables-Inside-a-Loop_script.js +++ /dev/null @@ -1,16 +0,0 @@ -function zeroArray(m, n) { - let newArray = []; - for (let i = 0; i < m; i++) { - let row = []; - - for (let j = 0; j < n; j++) { - row.push(0); - } - newArray.push(row); - } - return newArray; - } - - let matrix = zeroArray(3, 2); - console.log(matrix); - \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/12.Prevent-Infinite-Loops-with-a-Valid-Terminal-Condition_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/12.Prevent-Infinite-Loops-with-a-Valid-Terminal-Condition_script.js deleted file mode 100644 index 3edcf42..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/04-Debugging/12.Prevent-Infinite-Loops-with-a-Valid-Terminal-Condition_script.js +++ /dev/null @@ -1,5 +0,0 @@ -function myFunc() { - for (let i = 1; i <= 4; i += 2) { - console.log("Still going!"); - } - } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/01.Use-an-Array-to-Store-a-Collection-of-Data_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/01.Use-an-Array-to-Store-a-Collection-of-Data_script.js deleted file mode 100644 index 41a22b4..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/01.Use-an-Array-to-Store-a-Collection-of-Data_script.js +++ /dev/null @@ -1 +0,0 @@ -let yourArray = ['one', 2, 'three', true, false, undefined, null] diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/02.Access-an-Array-s-Using-Bracket-Notation_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/02.Access-an-Array-s-Using-Bracket-Notation_script.js deleted file mode 100644 index 6971804..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/02.Access-an-Array-s-Using-Bracket-Notation_script.js +++ /dev/null @@ -1,3 +0,0 @@ -let myArray = ["a", "b", "c", "d"]; -myArray[1] = "g" -console.log(myArray); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/03.Add-Items-to-an-Array-with-push()-and-unshift()_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/03.Add-Items-to-an-Array-with-push()-and-unshift()_script.js deleted file mode 100644 index 953b02b..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/03.Add-Items-to-an-Array-with-push()-and-unshift()_script.js +++ /dev/null @@ -1,7 +0,0 @@ -function mixedNumbers(arr) { - arr.unshift("I", 2, "three"); - arr.push(7, "VIII", 9); - return arr; -} - -console.log(mixedNumbers(['IV', 5, 'six'])); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/04.Remove-Items-from-an-Array-with-pop()-and-shift()_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/04.Remove-Items-from-an-Array-with-pop()-and-shift()_script.js deleted file mode 100644 index 8085ca8..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/04.Remove-Items-from-an-Array-with-pop()-and-shift()_script.js +++ /dev/null @@ -1,7 +0,0 @@ -function popShift(arr) { - let popped = arr.pop(); - let shifted = arr.shift(); - return [shifted, popped]; - } - - console.log(popShift(['challenge', 'is', 'not', 'complete'])); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/05.Remove-Items-Using-splice()_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/05.Remove-Items-Using-splice()_script.js deleted file mode 100644 index 95787f2..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/05.Remove-Items-Using-splice()_script.js +++ /dev/null @@ -1,4 +0,0 @@ -const arr = [2, 4, 5, 1, 7, 5, 2, 1]; -arr.splice(2, 1); -arr.splice(3, 2); -console.log(arr); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/06.Add-Items-Using-splice()_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/06.Add-Items-Using-splice()_script.js deleted file mode 100644 index d15a6b2..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/06.Add-Items-Using-splice()_script.js +++ /dev/null @@ -1,6 +0,0 @@ -function htmlColorNames(arr) { - arr.splice(0, 2, 'DarkSalmon', 'BlanchedAlmond'); - return arr; - } - - console.log(htmlColorNames(['DarkGoldenRod', 'WhiteSmoke', 'LavenderBlush', 'PaleTurquoise', 'FireBrick'])); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/07.Copy-Array-Items-Using-slice()_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/07.Copy-Array-Items-Using-slice()_script.js deleted file mode 100644 index b3f029c..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/07.Copy-Array-Items-Using-slice()_script.js +++ /dev/null @@ -1,6 +0,0 @@ -function forecast(arr) { - arr = arr.slice(2, 4); - return arr; - } - - console.log(forecast(['cold', 'rainy', 'warm', 'sunny', 'cool', 'thunderstorms'])); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/08.Copy-an-Array-with-the-Spread-Operator_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/08.Copy-an-Array-with-the-Spread-Operator_script.js deleted file mode 100644 index c35a510..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/08.Copy-an-Array-with-the-Spread-Operator_script.js +++ /dev/null @@ -1,10 +0,0 @@ -function copyMachine(arr, num) { - let newArr = []; - while (num >= 1) { - newArr.push([...arr]); - num--; - } - return newArr; - } - - console.log(copyMachine([true, false, true], 2)); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/09.Combine-Arrays-with-the-Spread-Operator_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/09.Combine-Arrays-with-the-Spread-Operator_script.js deleted file mode 100644 index 7e7fd6e..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/09.Combine-Arrays-with-the-Spread-Operator_script.js +++ /dev/null @@ -1,8 +0,0 @@ -function spreadOut() { - let fragment = ['to', 'code']; - let sentence = ['learning', ...fragment, 'is', 'fun']; - - return sentence; - } - - console.log(spreadOut()); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/10.Check-For-The-Presence-of-an-Element-With-indexOf()_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/10.Check-For-The-Presence-of-an-Element-With-indexOf()_script.js deleted file mode 100644 index 75a333d..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/10.Check-For-The-Presence-of-an-Element-With-indexOf()_script.js +++ /dev/null @@ -1,5 +0,0 @@ -function quickCheck(arr, elem) { - return arr.indexOf(elem) < 0 ? false : true; - } - - console.log(quickCheck(['squash', 'onions', 'shallots'], 'mushrooms')); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/11.Iterate-Through-All-an-Array's-Items-Using-For-Loops_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/11.Iterate-Through-All-an-Array's-Items-Using-For-Loops_script.js deleted file mode 100644 index b91ac0e..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/11.Iterate-Through-All-an-Array's-Items-Using-For-Loops_script.js +++ /dev/null @@ -1,12 +0,0 @@ -function filteredArray(arr, elem) { - let newArr = []; - - for (let i = 0; i < arr.length; i++) { - if (arr[i].indexOf(elem) == -1) { - newArr.push(arr[i]); - } - } - - return newArr; - } - \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/12.Create-complex-multi-dimensional-arrays_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/12.Create-complex-multi-dimensional-arrays_script.js deleted file mode 100644 index 7fa28f4..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/12.Create-complex-multi-dimensional-arrays_script.js +++ /dev/null @@ -1,7 +0,0 @@ -let myNestedArray = [ - ["unshift", false, 1, 2, 3, "complex", "nested"], - ["loop", "shift", 6, 7, 1000, "method"], - ["concat", false, true, "spread", "array", ["deep"]], - ["mutate", 1327.98, "splice", "slice", "push", [["deeper"]]], - ["iterate", 1.3849, 7, "8.4876", "arbitrary", "depth", [[["deepest"]]]] - ]; \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/13.Add-Key-Value-Pairs-to-JavaScript-Objects_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/13.Add-Key-Value-Pairs-to-JavaScript-Objects_script.js deleted file mode 100644 index 24c6068..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/13.Add-Key-Value-Pairs-to-JavaScript-Objects_script.js +++ /dev/null @@ -1,11 +0,0 @@ -let foods = { - apples: 25, - oranges: 32, - plums: 28 - }; - - foods["bananas"] = 13; - foods["grapes"] = 35; - foods["strawberries"] = 27; - - console.log(foods); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/14.Modify-an-Object-Nested-Within-an-Object_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/14.Modify-an-Object-Nested-Within-an-Object_script.js deleted file mode 100644 index fb5bfb2..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/14.Modify-an-Object-Nested-Within-an-Object_script.js +++ /dev/null @@ -1,12 +0,0 @@ -let userActivity = { - id: 23894201352, - date: "January 1, 2017", - data: { - totalUsers: 51, - online: 42 - } - }; - - userActivity.data.online = 45; - - console.log(userActivity); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/15.Access-Property-Names-with-Bracket-Notation_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/15.Access-Property-Names-with-Bracket-Notation_script.js deleted file mode 100644 index e590f5c..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/15.Access-Property-Names-with-Bracket-Notation_script.js +++ /dev/null @@ -1,14 +0,0 @@ -let foods = { - apples: 25, - oranges: 32, - plums: 28, - bananas: 13, - grapes: 35, - strawberries: 27 - }; - - function checkInventory(scannedItem) { - return foods[scannedItem]; - } - - console.log(checkInventory("apples")); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/16.Use-the-delete-Keyword-to-Remove-Object-Properties_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/16.Use-the-delete-Keyword-to-Remove-Object-Properties_script.js deleted file mode 100644 index 565b711..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/16.Use-the-delete-Keyword-to-Remove-Object-Properties_script.js +++ /dev/null @@ -1,14 +0,0 @@ -let foods = { - apples: 25, - oranges: 32, - plums: 28, - bananas: 13, - grapes: 35, - strawberries: 27 - }; - - delete foods.oranges; - delete foods.plums; - delete foods.strawberries; - - console.log(foods); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/17.Check-if-an-Object-has-a-Property_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/17.Check-if-an-Object-has-a-Property_script.js deleted file mode 100644 index bb04ac1..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/17.Check-if-an-Object-has-a-Property_script.js +++ /dev/null @@ -1,30 +0,0 @@ -let users = { - Alan: { - age: 27, - online: true - }, - Jeff: { - age: 32, - online: true - }, - Sarah: { - age: 48, - online: true - }, - Ryan: { - age: 19, - online: true - } - }; - - function isEveryoneHere(userObj) { - if ( - userObj.hasOwnProperty("Alan") && - userObj.hasOwnProperty("Jeff") && - userObj.hasOwnProperty("Sarah") && - userObj.hasOwnProperty("Ryan") - ) { - return true; - } - return false; - } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/18.Iterate-Through-the-Keys-of-an Object-with-a-for-in-Statement_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/18.Iterate-Through-the-Keys-of-an Object-with-a-for-in-Statement_script.js deleted file mode 100644 index 6a80f1d..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/18.Iterate-Through-the-Keys-of-an Object-with-a-for-in-Statement_script.js +++ /dev/null @@ -1,9 +0,0 @@ -function countOnline(usersObj) { - let result = 0; - for (let user in usersObj) { - if (usersObj[user].online === true) { - result++; - } - } - return result; - } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/19.Generate-an-Array-of-All-Object-Keys-with-Object.keys()_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/19.Generate-an-Array-of-All-Object-Keys-with-Object.keys()_script.js deleted file mode 100644 index 9706a4d..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/19.Generate-an-Array-of-All-Object-Keys-with-Object.keys()_script.js +++ /dev/null @@ -1,24 +0,0 @@ -let users = { - Alan: { - age: 27, - online: false - }, - Jeff: { - age: 32, - online: true - }, - Sarah: { - age: 48, - online: false - }, - Ryan: { - age: 19, - online: true - } - }; - - function getArrayOfUsers(obj) { - return Object.keys(obj); - } - - console.log(getArrayOfUsers(users)); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/20.Modify-an-Array-Stored-in-an-Object_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/20.Modify-an-Array-Stored-in-an-Object_script.js deleted file mode 100644 index ba7707f..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/05-Basic-Data-Structures/20.Modify-an-Array-Stored-in-an-Object_script.js +++ /dev/null @@ -1,22 +0,0 @@ -let user = { - name: "Kenneth", - age: 28, - data: { - username: "kennethCodesAllDay", - joinDate: "March 26, 2016", - organization: "freeCodeCamp", - friends: ["Sam", "Kira", "Tomo"], - location: { - city: "San Francisco", - state: "CA", - country: "USA" - } - } - }; - - function addFriend(userObj, friend) { -userObj.data.friends.push(friend); - return userObj.data.friends; - } - - console.log(addFriend(user, "Pete")); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/01.Convert-Celsius-to-Fahrenheit_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/01.Convert-Celsius-to-Fahrenheit_script.js deleted file mode 100644 index 33e37af..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/01.Convert-Celsius-to-Fahrenheit_script.js +++ /dev/null @@ -1,6 +0,0 @@ -function convertCtoF(celsius) { - let fahrenheit = celsius * 9 / 5 + 32; - return fahrenheit; - } - - convertCtoF(30); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/02.Reverse-a-String_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/02.Reverse-a-String_script.js deleted file mode 100644 index 9e91553..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/02.Reverse-a-String_script.js +++ /dev/null @@ -1,9 +0,0 @@ -function reverseString(str) { - let reversedStr = ""; - for (let i = str.length - 1; i >= 0; i--) { - reversedStr += str[i]; - } - return reversedStr; - } - - reverseString("hello"); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/03.Factorialize-a-Number_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/03.Factorialize-a-Number_script.js deleted file mode 100644 index 0f420e5..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/03.Factorialize-a-Number_script.js +++ /dev/null @@ -1,12 +0,0 @@ -function factorialize(num) { - let result = 1; - for (let i = 1; i <= num; i++) { - const element = i; - result *= element; - console.log(num); - } - - return result; -} - - factorialize(5); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/04.Find-the-Longest-Word-in-a-String_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/04.Find-the-Longest-Word-in-a-String_script.js deleted file mode 100644 index 5e8c6db..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/04.Find-the-Longest-Word-in-a-String_script.js +++ /dev/null @@ -1,15 +0,0 @@ -function findLongestWordLength(str) { - let maxLength = -1; - let words = str.split(' '); - - for (let i = 0; i < words.length; i++) { - const elementLength = words[i].length; - if (elementLength > maxLength) { - maxLength = elementLength; - } - } - - return maxLength; - } - - findLongestWordLength("The quick brown fox jumped over the lazy dog"); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/05.Return-Largest-Numbers-in-Arrays_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/05.Return-Largest-Numbers-in-Arrays_script.js deleted file mode 100644 index e52119c..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/05.Return-Largest-Numbers-in-Arrays_script.js +++ /dev/null @@ -1,16 +0,0 @@ -function largestOfFour(arr) { - const results = []; - for (let i = 0; i < arr.length; i++) { - let largestNumber = arr[i][0]; - for (let j = 1; j < arr[i].length; j++) { - if (arr[i][j] > largestNumber) { - largestNumber = arr[i][j]; - } - } - results[i] = largestNumber; - } - - return results; - } - - largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/06.Confirm-the-Ending_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/06.Confirm-the-Ending_script.js deleted file mode 100644 index d3c5bde..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/06.Confirm-the-Ending_script.js +++ /dev/null @@ -1,7 +0,0 @@ -function confirmEnding(str, target) { - - return str.slice(str.length - target.length) === target; - - } - - confirmEnding("Bastian", "n"); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/07.Repeat-a-String-Repeat-a-String_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/07.Repeat-a-String-Repeat-a-String_script.js deleted file mode 100644 index 5fd8d14..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/07.Repeat-a-String-Repeat-a-String_script.js +++ /dev/null @@ -1,9 +0,0 @@ -function repeatStringNumTimes(str, num) { - let repeatedStr = ""; - for (let i = 0; i < num; i++) { - repeatedStr += str; - } - return repeatedStr; - } - - repeatStringNumTimes("abc", 3); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/08.Truncate-a-String_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/08.Truncate-a-String_script.js deleted file mode 100644 index 8a8699a..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/08.Truncate-a-String_script.js +++ /dev/null @@ -1,5 +0,0 @@ -function truncateString(str, num) { - return str.length <= num ? str.slice(0, num) : str.slice(0, num) + "..."; - } - - truncateString("A-tisket a-tasket A green and yellow basket", 8); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/09.Finders-Keepers_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/09.Finders-Keepers_script.js deleted file mode 100644 index 318b3e5..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/09.Finders-Keepers_script.js +++ /dev/null @@ -1,12 +0,0 @@ -function findElement(arr, func) { - let num = 0; - - for (let i = 0; i < arr.length; i++) { - num = arr[i]; - if (func(num)) { - return num; - } - } - - return undefined; - } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/10.Boo-who_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/10.Boo-who_script.js deleted file mode 100644 index 2c06348..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/10.Boo-who_script.js +++ /dev/null @@ -1,5 +0,0 @@ -function booWho(bool) { - return bool === true || bool === false ? true : false; - } - - booWho(null); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/11.Title-Case-a-Sentence_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/11.Title-Case-a-Sentence_script.js deleted file mode 100644 index dbe9c02..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/11.Title-Case-a-Sentence_script.js +++ /dev/null @@ -1,8 +0,0 @@ -function titleCase(str) { - const newTitle = str.split(" "); - const updatedTitle = []; - for (let st in newTitle) { - updatedTitle[st] = newTitle[st][0].toUpperCase() + newTitle[st].slice(1).toLowerCase(); - } - return updatedTitle.join(" "); - } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/12.Slice-and-Splice_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/12.Slice-and-Splice_script.js deleted file mode 100644 index 4ac59f6..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/12.Slice-and-Splice_script.js +++ /dev/null @@ -1,8 +0,0 @@ -function frankenSplice(arr1, arr2, n) { - let localArray = arr2.slice(); - for (let i = 0; i < arr1.length; i++) { - localArray.splice(n, 0, arr1[i]); - n++; - } - return localArray; - } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/13.Falsy-Bouncer_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/13.Falsy-Bouncer_script.js deleted file mode 100644 index 1c65511..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/13.Falsy-Bouncer_script.js +++ /dev/null @@ -1,7 +0,0 @@ -function bouncer(arr) { - let newArray = []; - for (let i = 0; i < arr.length; i++) { - if (arr[i]) newArray.push(arr[i]); - } - return newArray; - } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/14.Where-do-I-Belong_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/14.Where-do-I-Belong_script.js deleted file mode 100644 index 825c6e2..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/14.Where-do-I-Belong_script.js +++ /dev/null @@ -1,10 +0,0 @@ -function getIndexToIns(arr, num) { - arr.sort((a, b) => a - b); - - for (let i = 0; i < arr.length; i++) { - if (arr[i] >= num) - return i; - } - - return arr.length; - } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/15.Mutations_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/15.Mutations_script.js deleted file mode 100644 index 753f5f6..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/15.Mutations_script.js +++ /dev/null @@ -1,8 +0,0 @@ -function mutation(arr) { - let test = arr[1].toLowerCase(); - let target = arr[0].toLowerCase(); - for (let i = 0; i < test.length; i++) { - if (target.indexOf(test[i]) < 0) return false; - } - return true; - } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/16.Chunky-Monkey_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/16.Chunky-Monkey_script.js deleted file mode 100644 index 88eb6fb..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/06-Basic-Algorithm-Scripting/16.Chunky-Monkey_script.js +++ /dev/null @@ -1,16 +0,0 @@ -function chunkArrayInGroups(arr, size) { - let temp = []; - let result = []; - - for (let a = 0; a < arr.length; a++) { - if (a % size !== size - 1) temp.push(arr[a]); - else { - temp.push(arr[a]); - result.push(temp); - temp = []; - } - } - - if (temp.length !== 0) result.push(temp); - return result; - } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/01.Create-a-Basic-JavaScript-Object_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/01.Create-a-Basic-JavaScript-Object_script.js deleted file mode 100644 index 0952f26..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/01.Create-a-Basic-JavaScript-Object_script.js +++ /dev/null @@ -1,4 +0,0 @@ -let dog = { - name: 'Aflac', - numLegs: 2, -}; diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/02.Use-Dot-Notation-to-Access-the-Properties-of-an-Object_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/02.Use-Dot-Notation-to-Access-the-Properties-of-an-Object_script.js deleted file mode 100644 index de53ddc..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/02.Use-Dot-Notation-to-Access-the-Properties-of-an-Object_script.js +++ /dev/null @@ -1,6 +0,0 @@ -let dog = { - name: 'Spot', - numLegs: 4, -}; -console.log(dog.name); -console.log(dog.numLegs); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/03.Create-a-Method-on-an-Object_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/03.Create-a-Method-on-an-Object_script.js deleted file mode 100644 index c5a6ada..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/03.Create-a-Method-on-an-Object_script.js +++ /dev/null @@ -1,9 +0,0 @@ -let dog = { - name: 'Spot', - numLegs: 4, - sayLegs: function () { - return 'This dog has ' + dog.numLegs + ' legs.'; - }, -}; - -dog.sayLegs(); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/04.Make-Code-More-Reusable-with-the-this-Keyword_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/04.Make-Code-More-Reusable-with-the-this-Keyword_script.js deleted file mode 100644 index 0dbeb29..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/04.Make-Code-More-Reusable-with-the-this-Keyword_script.js +++ /dev/null @@ -1,9 +0,0 @@ -let dog = { - name: 'Spot', - numLegs: 4, - sayLegs: function () { - return 'This dog has ' + this.numLegs + ' legs.'; - }, -}; - -dog.sayLegs(); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/05.Define-a-Constructor-Function_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/05.Define-a-Constructor-Function_script.js deleted file mode 100644 index 3781fe4..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/05.Define-a-Constructor-Function_script.js +++ /dev/null @@ -1,5 +0,0 @@ -function Dog() { - this.name = 'Rex'; - this.color = 'Golden'; - this.numLegs = 4; -} diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/06.Use-a-Constructor-to-Create-Objects_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/06.Use-a-Constructor-to-Create-Objects_script.js deleted file mode 100644 index 7600998..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/06.Use-a-Constructor-to-Create-Objects_script.js +++ /dev/null @@ -1,7 +0,0 @@ -function Dog() { - this.name = 'Rupert'; - this.color = 'brown'; - this.numLegs = 4; -} - -let hound = new Dog(); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/07.Extend-Constructors-to-Receive-Arguments_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/07.Extend-Constructors-to-Receive-Arguments_script.js deleted file mode 100644 index 272be09..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/07.Extend-Constructors-to-Receive-Arguments_script.js +++ /dev/null @@ -1,6 +0,0 @@ -function Dog(name, color) { - this.name = name; - this.color = color; - this.numLegs = 4; -} -let terrier = new Dog('Rex', 'black'); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/08.Verify-an-Object's-Constructor-with-instanceof_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/08.Verify-an-Object's-Constructor-with-instanceof_script.js deleted file mode 100644 index bb2a479..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/08.Verify-an-Object's-Constructor-with-instanceof_script.js +++ /dev/null @@ -1,7 +0,0 @@ -function House(numBedrooms) { - this.numBedrooms = numBedrooms; -} - -let myHouse = new House(2); - -myHouse instanceof House; diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/09.Understand-Own-Properties_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/09.Understand-Own-Properties_script.js deleted file mode 100644 index 10f388b..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/09.Understand-Own-Properties_script.js +++ /dev/null @@ -1,13 +0,0 @@ -function Bird(name) { - this.name = name; - this.numLegs = 2; -} - -let canary = new Bird('Tweety'); -let ownProps = []; - -for (let property in canary) { - if (canary.hasOwnProperty(property)) { - ownProps.push(property); - } -} diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/10.Use-Prototype-Properties-to-Reduce-Duplicate-Code_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/10.Use-Prototype-Properties-to-Reduce-Duplicate-Code_script.js deleted file mode 100644 index bf3c17b..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/10.Use-Prototype-Properties-to-Reduce-Duplicate-Code_script.js +++ /dev/null @@ -1,6 +0,0 @@ -function Dog(name) { - this.name = name; -} - -let beagle = new Dog('Snoopy'); -Dog.prototype.numLegs = 2; diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/11.Iterate-Over-All-Properties_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/11.Iterate-Over-All-Properties_script.js deleted file mode 100644 index c22133f..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/11.Iterate-Over-All-Properties_script.js +++ /dev/null @@ -1,19 +0,0 @@ -function Dog(name) { - this.name = name; -} - -Dog.prototype.numLegs = 4; - -let beagle = new Dog('Snoopy'); - -let ownProps = []; -let prototypeProps = []; - -for (let property in beagle) { - if(beagle.hasOwnProperty(property)) { - ownProps.push(property); - } else { - prototypeProps.push(property); - } - } - \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/12.Understand-the-Constructor-Property_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/12.Understand-the-Constructor-Property_script.js deleted file mode 100644 index e82f808..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/12.Understand-the-Constructor-Property_script.js +++ /dev/null @@ -1,7 +0,0 @@ -function Dog(name) { - this.name = name; -} - -function joinDogFraternity(candidate) { - return candidate.constructor === Dog; -} diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/13.Change-the-Prototype-to-a-New-Object_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/13.Change-the-Prototype-to-a-New-Object_script.js deleted file mode 100644 index dc6169c..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/13.Change-the-Prototype-to-a-New-Object_script.js +++ /dev/null @@ -1,13 +0,0 @@ -function Dog(name) { - this.name = name; -} - -Dog.prototype = { - numLegs: 4, - eat: function () { - console.log('nom nom nom'); - }, - describe: function () { - console.log('My name is ' + this.name); - }, -}; diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/14.Remember-to-Set-the-Constructor-Property-when-Changing-the-Prototype_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/14.Remember-to-Set-the-Constructor-Property-when-Changing-the-Prototype_script.js deleted file mode 100644 index 42c86b9..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/14.Remember-to-Set-the-Constructor-Property-when-Changing-the-Prototype_script.js +++ /dev/null @@ -1,14 +0,0 @@ -function Dog(name) { - this.name = name; -} - -Dog.prototype = { - constructor: Dog, - numLegs: 2, - eat: function () { - console.log('nom nom nom'); - }, - describe: function () { - console.log('My name is ' + this.name); - }, -}; diff --git "a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/15.Understand-Where-an-Object\342\200\231s-Prototype-Comes-From_script.js" "b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/15.Understand-Where-an-Object\342\200\231s-Prototype-Comes-From_script.js" deleted file mode 100644 index d0b8dae..0000000 --- "a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/15.Understand-Where-an-Object\342\200\231s-Prototype-Comes-From_script.js" +++ /dev/null @@ -1,7 +0,0 @@ -function Dog(name) { - this.name = name; -} - -let beagle = new Dog('Snoopy'); - -console.log(Dog.prototype.isPrototypeOf(beagle)); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/16.Understand-the-Prototype-Chain_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/16.Understand-the-Prototype-Chain_script.js deleted file mode 100644 index 1b30652..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/16.Understand-the-Prototype-Chain_script.js +++ /dev/null @@ -1,8 +0,0 @@ -function Dog(name) { - this.name = name; -} - -let beagle = new Dog('Snoopy'); - -Dog.prototype.isPrototypeOf(beagle); -Object.prototype.isPrototypeOf(Dog.prototype); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/17.Use-Inheritance-So-You-Don't-Repeat-Yourself_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/17.Use-Inheritance-So-You-Don't-Repeat-Yourself_script.js deleted file mode 100644 index 38fc76a..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/17.Use-Inheritance-So-You-Don't-Repeat-Yourself_script.js +++ /dev/null @@ -1,24 +0,0 @@ -function Cat(name) { - this.name = name; -} - -Cat.prototype = { - constructor: Cat, -}; - -function Bear(name) { - this.name = name; -} - -Bear.prototype = { - constructor: Bear, -}; - -function Animal() {} - -Animal.prototype = { - constructor: Animal, - eat: function () { - console.log('nom nom nom'); - }, -}; diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/18.Inherit-Behaviors-from-a-Supertype_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/18.Inherit-Behaviors-from-a-Supertype_script.js deleted file mode 100644 index a8a2756..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/18.Inherit-Behaviors-from-a-Supertype_script.js +++ /dev/null @@ -1,11 +0,0 @@ -function Animal() {} - -Animal.prototype = { - constructor: Animal, - eat: function () { - console.log('nom nom nom'); - }, -}; - -let duck = Object.create(Animal.prototype);; -let beagle = Object.create(Animal.prototype);; diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/19.Set-the-Child's-Prototype-to-an-Instance-of-the-Parent_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/19.Set-the-Child's-Prototype-to-an-Instance-of-the-Parent_script.js deleted file mode 100644 index 19f76b3..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/19.Set-the-Child's-Prototype-to-an-Instance-of-the-Parent_script.js +++ /dev/null @@ -1,13 +0,0 @@ -function Animal() {} - -Animal.prototype = { - constructor: Animal, - eat: function () { - console.log('nom nom nom'); - }, -}; - -function Dog() {} - -let beagle = new Dog(); -Dog.prototype = Object.create(Animal.prototype); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/20.Reset-an-Inherited-Constructor-Property_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/20.Reset-an-Inherited-Constructor-Property_script.js deleted file mode 100644 index 4f81ffd..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/20.Reset-an-Inherited-Constructor-Property_script.js +++ /dev/null @@ -1,12 +0,0 @@ -function Animal() {} -function Bird() {} -function Dog() {} - -Bird.prototype = Object.create(Animal.prototype); -Dog.prototype = Object.create(Animal.prototype); - -Bird.prototype.constructor = Bird; -Dog.prototype.constructor = Dog; - -let duck = new Bird(); -let beagle = new Dog(); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/21.Add-Methods-After-Inheritance_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/21.Add-Methods-After-Inheritance_script.js deleted file mode 100644 index bff8c9a..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/21.Add-Methods-After-Inheritance_script.js +++ /dev/null @@ -1,14 +0,0 @@ -function Animal() {} -Animal.prototype.eat = function () { - console.log('nom nom nom'); -}; - -function Dog() {} - -Dog.prototype = Object.create(Animal.prototype); -Dog.prototype.constructor = Dog; -Dog.prototype.bark = function () { - console.log('Woof!'); -}; - -let beagle = new Dog(); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/22.Override-Inherited-Methods_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/22.Override-Inherited-Methods_script.js deleted file mode 100644 index aadea8d..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/22.Override-Inherited-Methods_script.js +++ /dev/null @@ -1,16 +0,0 @@ -function Bird() {} - -Bird.prototype.fly = function () { - return 'I am flying!'; -}; - -function Penguin() {} -Penguin.prototype = Object.create(Bird.prototype); -Penguin.prototype.constructor = Penguin; - -Penguin.prototype.fly = function () { - return 'Alas, this is a flightless bird.'; -}; - -let penguin = new Penguin(); -console.log(penguin.fly()); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/23.Use-a-Mixin-to-Add-Common-Behavior-Between-Unrelated-Objects_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/23.Use-a-Mixin-to-Add-Common-Behavior-Between-Unrelated-Objects_script.js deleted file mode 100644 index 8cb19c0..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/23.Use-a-Mixin-to-Add-Common-Behavior-Between-Unrelated-Objects_script.js +++ /dev/null @@ -1,17 +0,0 @@ -let bird = { - name: 'Donald', - numLegs: 2, -}; - -let boat = { - name: 'Warrior', - type: 'race-boat', -}; - -let glideMixin = function (obj) { - obj.glide = function () { - console.log('Gliding!'); - }; -}; -glideMixin(bird); -glideMixin(boat); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/24.Use-Closure-to-Protect-Properties-Within-an-Object-from-Being-Modified-Externally_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/24.Use-Closure-to-Protect-Properties-Within-an-Object-from-Being-Modified-Externally_script.js deleted file mode 100644 index 92c19c9..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/24.Use-Closure-to-Protect-Properties-Within-an-Object-from-Being-Modified-Externally_script.js +++ /dev/null @@ -1,7 +0,0 @@ -function Bird() { - let weight = 15; - - this.getWeight = function () { - return weight; - }; -} diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/25.Understand-the-Immediately-Invoked-Function-Expression-(IIFE)_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/25.Understand-the-Immediately-Invoked-Function-Expression-(IIFE)_script.js deleted file mode 100644 index 7e48d4f..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/25.Understand-the-Immediately-Invoked-Function-Expression-(IIFE)_script.js +++ /dev/null @@ -1,4 +0,0 @@ -(function () { - console.log('A cozy nest is ready'); -})(); -makeNest(); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/26.Use-an-IIFE-to-Create-a-Module_script.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/26.Use-an-IIFE-to-Create-a-Module_script.js deleted file mode 100644 index 273eb8a..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/07-Object-Oriented-Programming/26.Use-an-IIFE-to-Create-a-Module_script.js +++ /dev/null @@ -1,14 +0,0 @@ -let funModule = (function () { - return { - isCuteMixin: function (obj) { - obj.isCute = function () { - return true; - }; - }, - singMixin: function (obj) { - obj.sing = function () { - console.log('Singing to an awesome tune'); - }; - }, - }; -})(); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/01.Learn-About-Functional-Programming.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/01.Learn-About-Functional-Programming.js deleted file mode 100644 index a1c8364..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/01.Learn-About-Functional-Programming.js +++ /dev/null @@ -1,13 +0,0 @@ -const prepareTea = () => 'greenTea'; - -const getTea = (numOfCups) => { - const teaCups = []; - - for (let cups = 1; cups <= numOfCups; cups += 1) { - const teaCup = prepareTea(); - teaCups.push(teaCup); - } - return teaCups; -}; - -const tea4TeamFCC = getTea(40); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/02.Understand-Functional-Programming-Terminology.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/02.Understand-Functional-Programming-Terminology.js deleted file mode 100644 index 4b21f54..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/02.Understand-Functional-Programming-Terminology.js +++ /dev/null @@ -1,18 +0,0 @@ -const prepareGreenTea = () => 'greenTea'; - -const prepareBlackTea = () => 'blackTea'; - -const getTea = (prepareTea, numOfCups) => { - const teaCups = []; - - for (let cups = 1; cups <= numOfCups; cups += 1) { - const teaCup = prepareTea(); - teaCups.push(teaCup); - } - return teaCups; -}; - -const tea4GreenTeamFCC = getTea(prepareGreenTea, 27); -const tea4BlackTeamFCC = getTea(prepareBlackTea, 13); - -console.log(tea4GreenTeamFCC, tea4BlackTeamFCC); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/03.Understand-the-Hazards-of-Using-Imperative-Code.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/03.Understand-the-Hazards-of-Using-Imperative-Code.js deleted file mode 100644 index 9d8ceb5..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/03.Understand-the-Hazards-of-Using-Imperative-Code.js +++ /dev/null @@ -1,44 +0,0 @@ -const Window = function (tabs) { - this.tabs = tabs; -}; - -Window.prototype.join = function (otherWindow) { - this.tabs = this.tabs.concat(otherWindow.tabs); - return this; -}; - -Window.prototype.tabOpen = function (tab) { - this.tabs.push('new tab'); - return this; -}; - -Window.prototype.tabClose = function (index) { - const tabsBeforeIndex = this.tabs.slice(0, index); - const tabsAfterIndex = this.tabs.slice(index + 1); - - this.tabs = tabsBeforeIndex.concat(tabsAfterIndex); - - return this; -}; - -const workWindow = new Window([ - 'GMail', - 'Inbox', - 'Work mail', - 'Docs', - 'freeCodeCamp', -]); -const socialWindow = new Window([ - 'FB', - 'Gitter', - 'Reddit', - 'Twitter', - 'Medium', -]); -const videoWindow = new Window(['Netflix', 'YouTube', 'Vimeo', 'Vine']); - -const finalTabs = socialWindow - .tabOpen() - .join(videoWindow.tabClose(2)) - .join(workWindow.tabClose(1).tabOpen()); -console.log(finalTabs.tabs); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/04.Avoid-Mutations-and-Side-Effects-Using-Functional-Programming.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/04.Avoid-Mutations-and-Side-Effects-Using-Functional-Programming.js deleted file mode 100644 index a36e630..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/04.Avoid-Mutations-and-Side-Effects-Using-Functional-Programming.js +++ /dev/null @@ -1,5 +0,0 @@ -let fixedValue = 4; - -function incrementer() { - return (fixedValue + 1); -} diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/05.Pass-Arguments-to-Avoid-External-Dependence-in-a-Function.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/05.Pass-Arguments-to-Avoid-External-Dependence-in-a-Function.js deleted file mode 100644 index 23ce785..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/05.Pass-Arguments-to-Avoid-External-Dependence-in-a-Function.js +++ /dev/null @@ -1,5 +0,0 @@ -let fixedValue = 4; - -function incrementer(arg) { - return arg += 1;p -} diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/06.Refactor-Global-Variables-Out-of-Functions.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/06.Refactor-Global-Variables-Out-of-Functions.js deleted file mode 100644 index f1391e9..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/06.Refactor-Global-Variables-Out-of-Functions.js +++ /dev/null @@ -1,22 +0,0 @@ -var bookList = [ - 'The Hound of the Baskervilles', - 'On The Electrodynamics of Moving Bodies', - 'PhilosophiƦ Naturalis Principia Mathematica', - 'Disquisitiones Arithmeticae', -]; - -function add(array, bookName) { - let sliced = array.slice(0); - sliced.push(bookName); - return sliced; -} - -function remove(array, bookName) { - let slicedTwo = array.slice(0); - if (slicedTwo.indexOf(bookName) >= 0) { - let index = slicedTwo.indexOf(bookName); - - slicedTwo.splice(index, 1); - return slicedTwo; - } -} \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/07.Use-the-map-Method-to-Extract-Data-from-an-Array.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/07.Use-the-map-Method-to-Extract-Data-from-an-Array.js deleted file mode 100644 index c622667..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/07.Use-the-map-Method-to-Extract-Data-from-an-Array.js +++ /dev/null @@ -1,126 +0,0 @@ -const watchList = [ - { - Title: 'Inception', - Year: '2010', - Rated: 'PG-13', - Released: '16 Jul 2010', - Runtime: '148 min', - Genre: 'Action, Adventure, Crime', - Director: 'Christopher Nolan', - Writer: 'Christopher Nolan', - Actors: 'Leonardo DiCaprio, Joseph Gordon-Levitt, Elliot Page, Tom Hardy', - Plot: 'A thief, who steals corporate secrets through use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a CEO.', - Language: 'English, Japanese, French', - Country: 'USA, UK', - Awards: 'Won 4 Oscars. Another 143 wins & 198 nominations.', - Poster: - 'http://ia.media-imdb.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg', - Metascore: '74', - imdbRating: '8.8', - imdbVotes: '1,446,708', - imdbID: 'tt1375666', - Type: 'movie', - Response: 'True', - }, - { - Title: 'Interstellar', - Year: '2014', - Rated: 'PG-13', - Released: '07 Nov 2014', - Runtime: '169 min', - Genre: 'Adventure, Drama, Sci-Fi', - Director: 'Christopher Nolan', - Writer: 'Jonathan Nolan, Christopher Nolan', - Actors: 'Ellen Burstyn, Matthew McConaughey, Mackenzie Foy, John Lithgow', - Plot: "A team of explorers travel through a wormhole in space in an attempt to ensure humanity's survival.", - Language: 'English', - Country: 'USA, UK', - Awards: 'Won 1 Oscar. Another 39 wins & 132 nominations.', - Poster: - 'http://ia.media-imdb.com/images/M/MV5BMjIxNTU4MzY4MF5BMl5BanBnXkFtZTgwMzM4ODI3MjE@._V1_SX300.jpg', - Metascore: '74', - imdbRating: '8.6', - imdbVotes: '910,366', - imdbID: 'tt0816692', - Type: 'movie', - Response: 'True', - }, - { - Title: 'The Dark Knight', - Year: '2008', - Rated: 'PG-13', - Released: '18 Jul 2008', - Runtime: '152 min', - Genre: 'Action, Adventure, Crime', - Director: 'Christopher Nolan', - Writer: - 'Jonathan Nolan (screenplay), Christopher Nolan (screenplay), Christopher Nolan (story), David S. Goyer (story), Bob Kane (characters)', - Actors: 'Christian Bale, Heath Ledger, Aaron Eckhart, Michael Caine', - Plot: 'When the menace known as the Joker wreaks havoc and chaos on the people of Gotham, the caped crusader must come to terms with one of the greatest psychological tests of his ability to fight injustice.', - Language: 'English, Mandarin', - Country: 'USA, UK', - Awards: 'Won 2 Oscars. Another 146 wins & 142 nominations.', - Poster: - 'http://ia.media-imdb.com/images/M/MV5BMTMxNTMwODM0NF5BMl5BanBnXkFtZTcwODAyMTk2Mw@@._V1_SX300.jpg', - Metascore: '82', - imdbRating: '9.0', - imdbVotes: '1,652,832', - imdbID: 'tt0468569', - Type: 'movie', - Response: 'True', - }, - { - Title: 'Batman Begins', - Year: '2005', - Rated: 'PG-13', - Released: '15 Jun 2005', - Runtime: '140 min', - Genre: 'Action, Adventure', - Director: 'Christopher Nolan', - Writer: - 'Bob Kane (characters), David S. Goyer (story), Christopher Nolan (screenplay), David S. Goyer (screenplay)', - Actors: 'Christian Bale, Michael Caine, Liam Neeson, Katie Holmes', - Plot: 'After training with his mentor, Batman begins his fight to free crime-ridden Gotham City from the corruption that Scarecrow and the League of Shadows have cast upon it.', - Language: 'English, Urdu, Mandarin', - Country: 'USA, UK', - Awards: 'Nominated for 1 Oscar. Another 15 wins & 66 nominations.', - Poster: - 'http://ia.media-imdb.com/images/M/MV5BNTM3OTc0MzM2OV5BMl5BanBnXkFtZTYwNzUwMTI3._V1_SX300.jpg', - Metascore: '70', - imdbRating: '8.3', - imdbVotes: '972,584', - imdbID: 'tt0372784', - Type: 'movie', - Response: 'True', - }, - { - Title: 'Avatar', - Year: '2009', - Rated: 'PG-13', - Released: '18 Dec 2009', - Runtime: '162 min', - Genre: 'Action, Adventure, Fantasy', - Director: 'James Cameron', - Writer: 'James Cameron', - Actors: 'Sam Worthington, Zoe Saldana, Sigourney Weaver, Stephen Lang', - Plot: 'A paraplegic marine dispatched to the moon Pandora on a unique mission becomes torn between following his orders and protecting the world he feels is his home.', - Language: 'English, Spanish', - Country: 'USA, UK', - Awards: 'Won 3 Oscars. Another 80 wins & 121 nominations.', - Poster: - 'http://ia.media-imdb.com/images/M/MV5BMTYwOTEwNjAzMl5BMl5BanBnXkFtZTcwODc5MTUwMw@@._V1_SX300.jpg', - Metascore: '83', - imdbRating: '7.9', - imdbVotes: '876,575', - imdbID: 'tt0499549', - Type: 'movie', - Response: 'True', - }, -]; - -const ratings = watchList.map(({ Title: title, imdbRating: rating }) => ({ - title, - rating, -})); - -console.log(JSON.stringify(ratings)); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/08.Implement-map-on-a-Prototype.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/08.Implement-map-on-a-Prototype.js deleted file mode 100644 index 77adc77..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/08.Implement-map-on-a-Prototype.js +++ /dev/null @@ -1,14 +0,0 @@ - -const s = [23, 65, 98, 5]; - -Array.prototype.myMap = function (callback) { - const newArray = []; - for (let i = 0; i < this.length; i++) { - newArray.push(callback(this[i])); - } - return newArray; -}; - -const new_s = s.myMap(function (item) { - return item * 2; -}); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/09.Use-the-filter-Method-to-Extract-Data-from-an-Array.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/09.Use-the-filter-Method-to-Extract-Data-from-an-Array.js deleted file mode 100644 index 37e37e9..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/09.Use-the-filter-Method-to-Extract-Data-from-an-Array.js +++ /dev/null @@ -1,126 +0,0 @@ -const watchList = [ - { - Title: 'Inception', - Year: '2010', - Rated: 'PG-13', - Released: '16 Jul 2010', - Runtime: '148 min', - Genre: 'Action, Adventure, Crime', - Director: 'Christopher Nolan', - Writer: 'Christopher Nolan', - Actors: 'Leonardo DiCaprio, Joseph Gordon-Levitt, Elliot Page, Tom Hardy', - Plot: 'A thief, who steals corporate secrets through use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a CEO.', - Language: 'English, Japanese, French', - Country: 'USA, UK', - Awards: 'Won 4 Oscars. Another 143 wins & 198 nominations.', - Poster: - 'http://ia.media-imdb.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg', - Metascore: '74', - imdbRating: '8.8', - imdbVotes: '1,446,708', - imdbID: 'tt1375666', - Type: 'movie', - Response: 'True', - }, - { - Title: 'Interstellar', - Year: '2014', - Rated: 'PG-13', - Released: '07 Nov 2014', - Runtime: '169 min', - Genre: 'Adventure, Drama, Sci-Fi', - Director: 'Christopher Nolan', - Writer: 'Jonathan Nolan, Christopher Nolan', - Actors: 'Ellen Burstyn, Matthew McConaughey, Mackenzie Foy, John Lithgow', - Plot: "A team of explorers travel through a wormhole in space in an attempt to ensure humanity's survival.", - Language: 'English', - Country: 'USA, UK', - Awards: 'Won 1 Oscar. Another 39 wins & 132 nominations.', - Poster: - 'http://ia.media-imdb.com/images/M/MV5BMjIxNTU4MzY4MF5BMl5BanBnXkFtZTgwMzM4ODI3MjE@._V1_SX300.jpg', - Metascore: '74', - imdbRating: '8.6', - imdbVotes: '910,366', - imdbID: 'tt0816692', - Type: 'movie', - Response: 'True', - }, - { - Title: 'The Dark Knight', - Year: '2008', - Rated: 'PG-13', - Released: '18 Jul 2008', - Runtime: '152 min', - Genre: 'Action, Adventure, Crime', - Director: 'Christopher Nolan', - Writer: - 'Jonathan Nolan (screenplay), Christopher Nolan (screenplay), Christopher Nolan (story), David S. Goyer (story), Bob Kane (characters)', - Actors: 'Christian Bale, Heath Ledger, Aaron Eckhart, Michael Caine', - Plot: 'When the menace known as the Joker wreaks havoc and chaos on the people of Gotham, the caped crusader must come to terms with one of the greatest psychological tests of his ability to fight injustice.', - Language: 'English, Mandarin', - Country: 'USA, UK', - Awards: 'Won 2 Oscars. Another 146 wins & 142 nominations.', - Poster: - 'http://ia.media-imdb.com/images/M/MV5BMTMxNTMwODM0NF5BMl5BanBnXkFtZTcwODAyMTk2Mw@@._V1_SX300.jpg', - Metascore: '82', - imdbRating: '9.0', - imdbVotes: '1,652,832', - imdbID: 'tt0468569', - Type: 'movie', - Response: 'True', - }, - { - Title: 'Batman Begins', - Year: '2005', - Rated: 'PG-13', - Released: '15 Jun 2005', - Runtime: '140 min', - Genre: 'Action, Adventure', - Director: 'Christopher Nolan', - Writer: - 'Bob Kane (characters), David S. Goyer (story), Christopher Nolan (screenplay), David S. Goyer (screenplay)', - Actors: 'Christian Bale, Michael Caine, Liam Neeson, Katie Holmes', - Plot: 'After training with his mentor, Batman begins his fight to free crime-ridden Gotham City from the corruption that Scarecrow and the League of Shadows have cast upon it.', - Language: 'English, Urdu, Mandarin', - Country: 'USA, UK', - Awards: 'Nominated for 1 Oscar. Another 15 wins & 66 nominations.', - Poster: - 'http://ia.media-imdb.com/images/M/MV5BNTM3OTc0MzM2OV5BMl5BanBnXkFtZTYwNzUwMTI3._V1_SX300.jpg', - Metascore: '70', - imdbRating: '8.3', - imdbVotes: '972,584', - imdbID: 'tt0372784', - Type: 'movie', - Response: 'True', - }, - { - Title: 'Avatar', - Year: '2009', - Rated: 'PG-13', - Released: '18 Dec 2009', - Runtime: '162 min', - Genre: 'Action, Adventure, Fantasy', - Director: 'James Cameron', - Writer: 'James Cameron', - Actors: 'Sam Worthington, Zoe Saldana, Sigourney Weaver, Stephen Lang', - Plot: 'A paraplegic marine dispatched to the moon Pandora on a unique mission becomes torn between following his orders and protecting the world he feels is his home.', - Language: 'English, Spanish', - Country: 'USA, UK', - Awards: 'Won 3 Oscars. Another 80 wins & 121 nominations.', - Poster: - 'http://ia.media-imdb.com/images/M/MV5BMTYwOTEwNjAzMl5BMl5BanBnXkFtZTcwODc5MTUwMw@@._V1_SX300.jpg', - Metascore: '83', - imdbRating: '7.9', - imdbVotes: '876,575', - imdbID: 'tt0499549', - Type: 'movie', - Response: 'True', - }, -]; - -const filteredList = watchList.map(({ Title: title, imdbRating: rating }) => ({ - title, - rating, -})).filter(m => m.rating >= 8.00); - -console.log(filteredList); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/10.Implement-the-filter-Method-on-a-Prototype.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/10.Implement-the-filter-Method-on-a-Prototype.js deleted file mode 100644 index 348806b..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/10.Implement-the-filter-Method-on-a-Prototype.js +++ /dev/null @@ -1,16 +0,0 @@ -const s = [23, 65, 98, 5]; - -Array.prototype.myFilter = function (callback) { - const newArray = []; - - for (let i = 0; i < this.length; i++) { - if (callback(this[i]) === true) { - newArray.push(this[i]); - } - } - return newArray; -}; - -const new_s = s.myFilter(function (item) { - return item % 2 === 1; -}); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/11.Return-Part-of-an-Array-Using-the-slice-Method.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/11.Return-Part-of-an-Array-Using-the-slice-Method.js deleted file mode 100644 index 00ed9f6..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/11.Return-Part-of-an-Array-Using-the-slice-Method.js +++ /dev/null @@ -1,6 +0,0 @@ -function sliceArray(anim, beginSlice, endSlice) { - return anim.slice(beginSlice, endSlice); -} - -const inputAnim = ['Cat', 'Dog', 'Tiger', 'Zebra', 'Ant']; -sliceArray(inputAnim, 1, 3); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/12.Remove-Elements-from-an-Array-Using-slice-Instead-of-splice.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/12.Remove-Elements-from-an-Array-Using-slice-Instead-of-splice.js deleted file mode 100644 index c3203ea..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/12.Remove-Elements-from-an-Array-Using-slice-Instead-of-splice.js +++ /dev/null @@ -1,6 +0,0 @@ -function nonMutatingSplice(cities) { - return cities.slice(0, 3); -} - -const inputCities = ['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']; -nonMutatingSplice(inputCities); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/13.Combine-Two-Arrays-Using-the-concat-Method.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/13.Combine-Two-Arrays-Using-the-concat-Method.js deleted file mode 100644 index 3661471..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/13.Combine-Two-Arrays-Using-the-concat-Method.js +++ /dev/null @@ -1,7 +0,0 @@ -function nonMutatingConcat(original, attach) { - return original.concat(attach); -} - -const first = [1, 2, 3]; -const second = [4, 5]; -nonMutatingConcat(first, second); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/14.Add-Elements-to-the-End-of-an-Array-Using-concat-Instead-of-push.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/14.Add-Elements-to-the-End-of-an-Array-Using-concat-Instead-of-push.js deleted file mode 100644 index e1cf0f6..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/14.Add-Elements-to-the-End-of-an-Array-Using-concat-Instead-of-push.js +++ /dev/null @@ -1,7 +0,0 @@ -function nonMutatingPush(original, newItem) { - return original.concat(newItem); -} - -const first = [1, 2, 3]; -const second = [4, 5]; -nonMutatingPush(first, second); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/15.Use-the-reduce-Method-to-Analyze-Data.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/15.Use-the-reduce-Method-to-Analyze-Data.js deleted file mode 100644 index bfba19a..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/15.Use-the-reduce-Method-to-Analyze-Data.js +++ /dev/null @@ -1,131 +0,0 @@ -const watchList = [ - { - Title: 'Inception', - Year: '2010', - Rated: 'PG-13', - Released: '16 Jul 2010', - Runtime: '148 min', - Genre: 'Action, Adventure, Crime', - Director: 'Christopher Nolan', - Writer: 'Christopher Nolan', - Actors: 'Leonardo DiCaprio, Joseph Gordon-Levitt, Elliot Page, Tom Hardy', - Plot: 'A thief, who steals corporate secrets through use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a CEO.', - Language: 'English, Japanese, French', - Country: 'USA, UK', - Awards: 'Won 4 Oscars. Another 143 wins & 198 nominations.', - Poster: - 'http://ia.media-imdb.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg', - Metascore: '74', - imdbRating: '8.8', - imdbVotes: '1,446,708', - imdbID: 'tt1375666', - Type: 'movie', - Response: 'True', - }, - { - Title: 'Interstellar', - Year: '2014', - Rated: 'PG-13', - Released: '07 Nov 2014', - Runtime: '169 min', - Genre: 'Adventure, Drama, Sci-Fi', - Director: 'Christopher Nolan', - Writer: 'Jonathan Nolan, Christopher Nolan', - Actors: 'Ellen Burstyn, Matthew McConaughey, Mackenzie Foy, John Lithgow', - Plot: "A team of explorers travel through a wormhole in space in an attempt to ensure humanity's survival.", - Language: 'English', - Country: 'USA, UK', - Awards: 'Won 1 Oscar. Another 39 wins & 132 nominations.', - Poster: - 'http://ia.media-imdb.com/images/M/MV5BMjIxNTU4MzY4MF5BMl5BanBnXkFtZTgwMzM4ODI3MjE@._V1_SX300.jpg', - Metascore: '74', - imdbRating: '8.6', - imdbVotes: '910,366', - imdbID: 'tt0816692', - Type: 'movie', - Response: 'True', - }, - { - Title: 'The Dark Knight', - Year: '2008', - Rated: 'PG-13', - Released: '18 Jul 2008', - Runtime: '152 min', - Genre: 'Action, Adventure, Crime', - Director: 'Christopher Nolan', - Writer: - 'Jonathan Nolan (screenplay), Christopher Nolan (screenplay), Christopher Nolan (story), David S. Goyer (story), Bob Kane (characters)', - Actors: 'Christian Bale, Heath Ledger, Aaron Eckhart, Michael Caine', - Plot: 'When the menace known as the Joker wreaks havoc and chaos on the people of Gotham, the caped crusader must come to terms with one of the greatest psychological tests of his ability to fight injustice.', - Language: 'English, Mandarin', - Country: 'USA, UK', - Awards: 'Won 2 Oscars. Another 146 wins & 142 nominations.', - Poster: - 'http://ia.media-imdb.com/images/M/MV5BMTMxNTMwODM0NF5BMl5BanBnXkFtZTcwODAyMTk2Mw@@._V1_SX300.jpg', - Metascore: '82', - imdbRating: '9.0', - imdbVotes: '1,652,832', - imdbID: 'tt0468569', - Type: 'movie', - Response: 'True', - }, - { - Title: 'Batman Begins', - Year: '2005', - Rated: 'PG-13', - Released: '15 Jun 2005', - Runtime: '140 min', - Genre: 'Action, Adventure', - Director: 'Christopher Nolan', - Writer: - 'Bob Kane (characters), David S. Goyer (story), Christopher Nolan (screenplay), David S. Goyer (screenplay)', - Actors: 'Christian Bale, Michael Caine, Liam Neeson, Katie Holmes', - Plot: 'After training with his mentor, Batman begins his fight to free crime-ridden Gotham City from the corruption that Scarecrow and the League of Shadows have cast upon it.', - Language: 'English, Urdu, Mandarin', - Country: 'USA, UK', - Awards: 'Nominated for 1 Oscar. Another 15 wins & 66 nominations.', - Poster: - 'http://ia.media-imdb.com/images/M/MV5BNTM3OTc0MzM2OV5BMl5BanBnXkFtZTYwNzUwMTI3._V1_SX300.jpg', - Metascore: '70', - imdbRating: '8.3', - imdbVotes: '972,584', - imdbID: 'tt0372784', - Type: 'movie', - Response: 'True', - }, - { - Title: 'Avatar', - Year: '2009', - Rated: 'PG-13', - Released: '18 Dec 2009', - Runtime: '162 min', - Genre: 'Action, Adventure, Fantasy', - Director: 'James Cameron', - Writer: 'James Cameron', - Actors: 'Sam Worthington, Zoe Saldana, Sigourney Weaver, Stephen Lang', - Plot: 'A paraplegic marine dispatched to the moon Pandora on a unique mission becomes torn between following his orders and protecting the world he feels is his home.', - Language: 'English, Spanish', - Country: 'USA, UK', - Awards: 'Won 3 Oscars. Another 80 wins & 121 nominations.', - Poster: - 'http://ia.media-imdb.com/images/M/MV5BMTYwOTEwNjAzMl5BMl5BanBnXkFtZTcwODc5MTUwMw@@._V1_SX300.jpg', - Metascore: '83', - imdbRating: '7.9', - imdbVotes: '876,575', - imdbID: 'tt0499549', - Type: 'movie', - Response: 'True', - }, -]; - -function getRating(watchList) { - const averageRating = - watchList - .filter((film) => film.Director === 'Christopher Nolan') - .map((film) => Number(film.imdbRating)) - .reduce((sumOfRatings, rating) => sumOfRatings + rating) / - watchList.filter((film) => film.Director === 'Christopher Nolan').length; - return averageRating; -} - -console.log(getRating(watchList)); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/16.Use-Higher-Order-Functions-map-filter-or-reduce-to-Solve-a-Complex-Problem.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/16.Use-Higher-Order-Functions-map-filter-or-reduce-to-Solve-a-Complex-Problem.js deleted file mode 100644 index 361a5cf..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/16.Use-Higher-Order-Functions-map-filter-or-reduce-to-Solve-a-Complex-Problem.js +++ /dev/null @@ -1,8 +0,0 @@ -const squareList = (arr) => { - return arr - .filter((num) => num > 0 && num % parseInt(num) === 0) - .map((num) => Math.pow(num, 2)); -}; - -const squaredIntegers = squareList([-3, 4.8, 5, 3, -3.2]); -console.log(squaredIntegers); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/17.Sort-an-Array-Alphabetically-using-the-sort-Method.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/17.Sort-an-Array-Alphabetically-using-the-sort-Method.js deleted file mode 100644 index 2d7a260..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/17.Sort-an-Array-Alphabetically-using-the-sort-Method.js +++ /dev/null @@ -1,5 +0,0 @@ -function alphabeticalOrder(arr) { - return arr.sort(); -} - -alphabeticalOrder(['a', 'd', 'c', 'a', 'z', 'g']); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/18.Return-a-Sorted-Array-Without-Changing-the-Original-Array.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/18.Return-a-Sorted-Array-Without-Changing-the-Original-Array.js deleted file mode 100644 index 01f95cf..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/18.Return-a-Sorted-Array-Without-Changing-the-Original-Array.js +++ /dev/null @@ -1,7 +0,0 @@ -const globalArray = [5, 6, 3, 2, 9]; - -function nonMutatingSort(arr) { - return [].concat(arr).sort((a, b) => a - b); -} - -nonMutatingSort(globalArray); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/19.Split-a-String-into-an-Array-Using-the-split-Method.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/19.Split-a-String-into-an-Array-Using-the-split-Method.js deleted file mode 100644 index 49cda4f..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/19.Split-a-String-into-an-Array-Using-the-split-Method.js +++ /dev/null @@ -1,5 +0,0 @@ -function splitify(str) { - return str.split(/\s|\W/); -} - -splitify('Hello World,I-am code'); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/20.Combine-an-Array-into-a-String-Using-the-join-Method.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/20.Combine-an-Array-into-a-String-Using-the-join-Method.js deleted file mode 100644 index dfdc218..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/20.Combine-an-Array-into-a-String-Using-the-join-Method.js +++ /dev/null @@ -1,5 +0,0 @@ -function sentensify(str) { - return str.split(/\s|\W/).join(' '); -} - -sentensify('May-the-force-be-with-you'); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/21.Apply-Functional-Programming-to-Convert-Strings-to-URL-Slugs.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/21.Apply-Functional-Programming-to-Convert-Strings-to-URL-Slugs.js deleted file mode 100644 index 75c1f9c..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/21.Apply-Functional-Programming-to-Convert-Strings-to-URL-Slugs.js +++ /dev/null @@ -1,4 +0,0 @@ -function urlSlug(title) { - return title.toLowerCase().trim().split(/\s+/).join('-'); -} -console.log(urlSlug('A Mind Needs Books Like A Sword Needs A Whetstone')); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/22.Use-the-every-Method-to-Check-that-Every-Element-in-an-Array-Meets-a-Criteria.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/22.Use-the-every-Method-to-Check-that-Every-Element-in-an-Array-Meets-a-Criteria.js deleted file mode 100644 index cbd68cf..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/22.Use-the-every-Method-to-Check-that-Every-Element-in-an-Array-Meets-a-Criteria.js +++ /dev/null @@ -1,5 +0,0 @@ -function checkPositive(arr) { - return arr.every((x) => x > 0); -} - -checkPositive([1, 2, 3, -4, 5]); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/23.Use-the-some-Method-to-Check-that-Any-Elements-in-an-Array-Meet-a-Criteria.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/23.Use-the-some-Method-to-Check-that-Any-Elements-in-an-Array-Meet-a-Criteria.js deleted file mode 100644 index 3abf28b..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/23.Use-the-some-Method-to-Check-that-Any-Elements-in-an-Array-Meet-a-Criteria.js +++ /dev/null @@ -1,5 +0,0 @@ -function checkPositive(arr) { - return arr.some((x) => x > 0); -} - -checkPositive([1, 2, 3, -4, 5]); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/24.Introduction-to-Currying-and-Partial-Application.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/24.Introduction-to-Currying-and-Partial-Application.js deleted file mode 100644 index 183be26..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/08-Functional-Programming/24.Introduction-to-Currying-and-Partial-Application.js +++ /dev/null @@ -1,9 +0,0 @@ -function add(x) { - return function (y) { - return function (z) { - return x + y + z; - }; - }; -} - -add(10)(20)(30); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/01.Sum-All-Numbers-in-a-Range.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/01.Sum-All-Numbers-in-a-Range.js deleted file mode 100644 index 18b7e71..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/01.Sum-All-Numbers-in-a-Range.js +++ /dev/null @@ -1,20 +0,0 @@ -function sumAll(arr) { - let sum = 0; - if (arr[0]>arr[1]) { - let i = arr[1]; - let j = arr[0]; - for (i; i<=j; i++){ - sum+=i; - } - } - else { - let i = arr[0]; - let j = arr[1]; - for (i; i<=j; i++){ - sum+=i; - } - } - return sum; -} - -console.log(sumAll([1, 4])); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/02.Diff-Two-Arrays.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/02.Diff-Two-Arrays.js deleted file mode 100644 index 248618d..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/02.Diff-Two-Arrays.js +++ /dev/null @@ -1,7 +0,0 @@ -function diffArray(arr1, arr2) { - return [...diff(arr1, arr2), ...diff(arr2, arr1)]; - - function diff(a, b) { - return a.filter(item => b.indexOf(item) === -1); - } -} diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/03.Seek-and-Destroy.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/03.Seek-and-Destroy.js deleted file mode 100644 index 999abc5..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/03.Seek-and-Destroy.js +++ /dev/null @@ -1,8 +0,0 @@ -function destroyer(arr) { - const valsToRemove = Array.from(arguments).slice(1); - return arr.filter(function(val) { - return !valsToRemove.includes(val); - }); -} - -console.log(destroyer([1, 2, 3, 1, 2, 3], 2, 3)); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/04.Where-art-thou.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/04.Where-art-thou.js deleted file mode 100644 index a673428..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/04.Where-art-thou.js +++ /dev/null @@ -1,11 +0,0 @@ -function whatIsInAName(collection, source) { - const sourceKeys = Object.keys(source); - - return collection - .filter(obj => sourceKeys - .every(key => obj.hasOwnProperty(key) && - obj[key] === source[key])) - -} - -console.log(whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" })); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/05.Spinal-Tap-Case.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/05.Spinal-Tap-Case.js deleted file mode 100644 index 9041fd7..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/05.Spinal-Tap-Case.js +++ /dev/null @@ -1,8 +0,0 @@ -function spinalCase(str) { - return str - .split(/\s|_|(?=[A-Z])/) - .join("-") - .toLowerCase(); -} - -console.log(spinalCase('This Is Spinal Tap')); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/06.Pig-Latin.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/06.Pig-Latin.js deleted file mode 100644 index 764039f..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/06.Pig-Latin.js +++ /dev/null @@ -1,7 +0,0 @@ -function translatePigLatin(str) { - return str - .replace(/^[aeiou]\w*/, "$&way") - .replace(/(^[^aeiou]+)(\w*)/, "$2$1ay"); -} - -translatePigLatin("consonant"); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/07.Search-and-Replace.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/07.Search-and-Replace.js deleted file mode 100644 index 443ff4c..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/07.Search-and-Replace.js +++ /dev/null @@ -1,10 +0,0 @@ -function myReplace(str, before, after) { - const strArr = str.split(" "); - const [wordToReplace] = strArr.filter(item => item === before); - const replacement = wordToReplace[0] === wordToReplace[0].toUpperCase() - ? after[0].toUpperCase() + after.slice(1) - : after[0].toLowerCase() + after.slice(1); - return strArr.map(item => (item === before ? replacement : item)).join(" "); -} - -console.log(myReplace("A quick brown fox jumped over the lazy dog", "jumped", "leaped")); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/08.DNA-Pairing.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/08.DNA-Pairing.js deleted file mode 100644 index 428f9bd..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/08.DNA-Pairing.js +++ /dev/null @@ -1,12 +0,0 @@ -function pairElement(str) { - const pair = { - A: "T", - T: "A", - C: "G", - G: "C" - }; - - return str.split("").map(x=>[x, pair[x]]); -} - -console.log(pairElement("GCG")); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/09.Missing-letters.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/09.Missing-letters.js deleted file mode 100644 index 25fac44..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/09.Missing-letters.js +++ /dev/null @@ -1,11 +0,0 @@ -function fearNotLetter(str) { - var missing; - for(var i = 1; i a.concat(b)))]; -} - -console.log(uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1])); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/11.Convert-HTML-Entities.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/11.Convert-HTML-Entities.js deleted file mode 100644 index c93065a..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/11.Convert-HTML-Entities.js +++ /dev/null @@ -1,29 +0,0 @@ -function convertHTML(str) { - var temp = str.split(""); - - for (var i = 0; i < temp.length; i++) { - switch (temp[i]) { - case "<": - temp[i] = "<"; - break; - case "&": - temp[i] = "&"; - break; - case ">": - temp[i] = ">"; - break; - case '"': - temp[i] = """; - break; - case "'": - temp[i] = "'"; - break; - } - } - - temp = temp.join(""); - return temp; -} - - -console.log(convertHTML("Dolce & Gabbana")); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/12.Sum-All-Odd-Fibonacci-Numbers.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/12.Sum-All-Odd-Fibonacci-Numbers.js deleted file mode 100644 index 215240a..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/12.Sum-All-Odd-Fibonacci-Numbers.js +++ /dev/null @@ -1,15 +0,0 @@ -function sumFibs(num) { - let prevNumber = 0; - let currNumber = 1; - let result = 0; - while (currNumber <= num) { - if (currNumber % 2 !== 0) { - result += currNumber; - } - currNumber += prevNumber; - prevNumber = currNumber - prevNumber; - } - - return result; -} -console.log(sumFibs(4)); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/13.Sum-All-Primes.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/13.Sum-All-Primes.js deleted file mode 100644 index 06a57cc..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/13.Sum-All-Primes.js +++ /dev/null @@ -1,21 +0,0 @@ -function sumPrimes(num) { - var sum = 0; - for(var i = 0; i <= num;i++){ - if(IsPrime(i)){ - sum += i; - } - } - return sum; -} - -function IsPrime(n){ - if(n <= 1) return false; - for(var j = 2; Math.pow(j,2) <= n;j++){ - if(n % j === 0) { - return false; - } - } - return true; -} - -sumPrimes(10); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/14.Smallest-Common-Multiple.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/14.Smallest-Common-Multiple.js deleted file mode 100644 index ab064af..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/14.Smallest-Common-Multiple.js +++ /dev/null @@ -1,16 +0,0 @@ -function smallestCommons(arr) { - var max = Math.max(arr[0], arr[1]); - var min = Math.min(arr[0], arr[1]); - var mltple = max; - - for(var i = max; i >= min; i--){ - if(mltple % i !== 0){ - mltple += max; - i = max; - } - } - - return mltple; -} - -console.log(smallestCommons([1,5])); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/15.Drop-it.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/15.Drop-it.js deleted file mode 100644 index 872a765..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/15.Drop-it.js +++ /dev/null @@ -1,10 +0,0 @@ -function dropElements(arr, func) { - while (arr.length > 0 && !func(arr[0])) { - arr.shift(); - } - return arr; -} - -dropElements([1, 2, 3, 4], function (n) { - return n >= 3; -}); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/16.Steamroller.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/16.Steamroller.js deleted file mode 100644 index 2ba8dd6..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/16.Steamroller.js +++ /dev/null @@ -1,17 +0,0 @@ -function steamrollArray(arr) { - return arr - .toString() - .replace(',,', ',') - .split(',') - .map(function (v) { - if (v == '[object Object]') { - return {}; - } else if (isNaN(v)) { - return v; - } else { - return parseInt(v); - } - }); -} - -console.log(steamrollArray([1, [2], [3, [[4]]]])); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/17.Binary-Agents.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/17.Binary-Agents.js deleted file mode 100644 index e65a07a..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/17.Binary-Agents.js +++ /dev/null @@ -1,12 +0,0 @@ -function binaryAgent(str) { - var biString = str.split(' '); - var uniString = []; - - for (var i = 0; i < biString.length; i++) { - uniString.push(String.fromCharCode(parseInt(biString[i], 2))); - } - - return uniString.join(''); -} - -console.log(binaryAgent("01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111")); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/18.Everything-Be-True.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/18.Everything-Be-True.js deleted file mode 100644 index 6ece230..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/18.Everything-Be-True.js +++ /dev/null @@ -1,5 +0,0 @@ -function truthCheck(collection, pre) { - return collection.every((obj) => obj[pre]); -} - -console.log(truthCheck([{name: "Quincy", role: "Founder", isBot: false}, {name: "Naomi", role: "", isBot: false}, {name: "Camperbot", role: "Bot", isBot: true}], "isBot")); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/19.Arguments-Optional.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/19.Arguments-Optional.js deleted file mode 100644 index 1c6a56e..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/19.Arguments-Optional.js +++ /dev/null @@ -1,23 +0,0 @@ -function addTogether() { - const [first, second] = arguments; - - if (typeof first !== 'number') { - return undefined; - } else if (arguments.length === 1) { - function addSecond(second) { - if (typeof second !== 'number') { - return undefined; - } else { - return first + second; - } - } - - return addSecond; - } else if (typeof second !== 'number') { - return undefined; - } else { - return first + second; - } -} - -console.log(addTogether(2,3)); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/20.Make-a-Person.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/20.Make-a-Person.js deleted file mode 100644 index acf7f3b..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/20.Make-a-Person.js +++ /dev/null @@ -1,30 +0,0 @@ -const Person = function (firstAndLast) { - let fullName = firstAndLast; - - this.getFirstName = function () { - return fullName.split(' ')[0]; - }; - - this.getLastName = function () { - return fullName.split(' ')[1]; - }; - - this.getFullName = function () { - return fullName; - }; - - this.setFirstName = function (name) { - fullName = name + ' ' + fullName.split(' ')[1]; - }; - - this.setLastName = function (name) { - fullName = fullName.split(' ')[0] + ' ' + name; - }; - - this.setFullName = function (name) { - fullName = name; - }; -}; - -const bob = new Person('Bob Ross'); -console.log(bob.getFullName()); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/21.Map-the-Debris.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/21.Map-the-Debris.js deleted file mode 100644 index d467406..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/09-Intermediate-Algorithm-Scripting/21.Map-the-Debris.js +++ /dev/null @@ -1,20 +0,0 @@ -function orbitalPeriod(arr) { - const GM = 398600.4418; - const earthRadius = 6367.4447; - - const newArr = JSON.parse(JSON.stringify(arr)); - - newArr.forEach(function (item) { - const tmp = Math.round( - 2 * Math.PI * Math.sqrt(Math.pow(earthRadius + item.avgAlt, 3) / GM) - ); - - delete item.avgAlt; - - item.orbitalPeriod = tmp; - }); - - return newArr; -} - -console.log(orbitalPeriod([{name : "sputnik", avgAlt : 35873.5553}])); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Caesars-Cipher.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Caesars-Cipher.js deleted file mode 100644 index 0e2f57b..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Caesars-Cipher.js +++ /dev/null @@ -1,23 +0,0 @@ -function rot13(str) { - str = str.toUpperCase(); - var newStr = ""; - for (let i=0; i < str.length; i++){ - if (str.charCodeAt(i) >= 65 && str.charCodeAt(i) <= 90){ - //console.log(str.charCodeAt(i)); - var newCode = str.charCodeAt(i)+13; - if (newCode > 90){ - newCode = newCode - 90 + 64; - } - //console.log(newCode) - var newLetter = String.fromCharCode(newCode); - //console.log(str.charAt(i)) - newStr+=newLetter; - } - else newStr+=str.charAt(i); - } - - return newStr - -} - -rot13("SERR PBQR PNZC"); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Cash-Register.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Cash-Register.js deleted file mode 100644 index b60f112..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Cash-Register.js +++ /dev/null @@ -1,62 +0,0 @@ -function checkCashRegister(price, cash, cid) { - //const cidTotal = cid[0][1]*0.01+cid[1][1]*0.05+cid[2][1]*0.1+cid[3][1]*0.25+cid[4][1]*1+cid[5][1]*5+cid[6][1]*10+cid[7][1]*20+cid[8][1]*100; - let currency = [ - ["ONE HUNDRED", 100.00], - ["TWENTY", 20.00], - ["TEN", 10.00], - ["FIVE", 5.00], - ["ONE", 1.00], - ["QUARTER", 0.25], - ["DIME", 0.10], - ["NICKEL", 0.05], - ["PENNY", 0.01] - ]; - - let change = (cash-price).toFixed(2); - let cidTotal = 0; - for (let element of cid) { - cidTotal += element[1]; - } - cidTotal.toFixed(2); - - const output = { - status: "", - change: [] - } - - if (change == cidTotal){ - output.status = "CLOSED"; - output.change = cid; - } - - else if (change > cidTotal){ - output.status = "INSUFFICIENT_FUNDS"; - } - - else{ - cid.reverse(); - for (let i in currency){ - let returnMoney = 0; - //let noOfBills = cid[i][1]/currency[i][1]; - while(change >= currency[i][1] && cid[i][1]>0 && change!==0){ - change -= currency[i][1]; - cid[i][1] -= currency[i][1]; - returnMoney += currency[i][1]; - change = Math.round(change * 100) / 100; - //noOfBills-- - } - if(returnMoney>0) { - output.change.push([currency[i][0], returnMoney]) - output.status = "OPEN"; - } - } - if (change>0){ - output.status = "INSUFFICIENT_FUNDS"; - output.change = []; - } - } - console.log(output) - return output; -} - -checkCashRegister(19.5, 20, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]]); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Palindrome-Checker.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Palindrome-Checker.js deleted file mode 100644 index 2d2ba23..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Palindrome-Checker.js +++ /dev/null @@ -1,15 +0,0 @@ -function palindrome(str) { - var regexPattern = /[^A-Za-z0-9+]/g; - var newStr = (str.replace(regexPattern, "")).toLowerCase(); - var palStr = newStr.split("").reverse().join(""); - if (newStr == palStr) - return true; - else return false; -} - -palindrome('eye'); - -/*** -let str = prompt("Please enter a string: "); -palindrome(str); -***/ diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Roman-Numeral-Converter.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Roman-Numeral-Converter.js deleted file mode 100644 index 6b6d8ec..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Roman-Numeral-Converter.js +++ /dev/null @@ -1,60 +0,0 @@ -function convertToRoman(num) { - var romanNum = ""; - while(num>0){ - if (num >=1000){ - romanNum+="M"; - num-=1000; - } - else if (num >= 900){ - romanNum+="CM"; - num-=900; - } - else if (num >= 500){ - romanNum+="D"; - num-=500; - } - else if (num >= 400){ - romanNum+="CD"; - num-=400; - } - else if (num >= 100){ - romanNum+="C"; - num-=100; - } - else if (num >= 90){ - romanNum+="XC"; - num-=90; - } - else if (num >= 50){ - romanNum+="L"; - num-=50; - } - else if (num >= 40){ - romanNum+="XL"; - num-=40; - } - else if (num >= 10){ - romanNum+="X"; - num-=10; - } - else if (num >= 9){ - romanNum+="IX"; - num-=9; - } - else if (num >= 5){ - romanNum+="V"; - num-=5; - } - else if (num >= 4){ - romanNum+="IV"; - num-=4; - } - else { - romanNum+="I"; - num-=1; - } - } - return romanNum; -} - -convertToRoman(36); diff --git a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Telephone-Number-Validator.js b/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Telephone-Number-Validator.js deleted file mode 100644 index 96b39a9..0000000 --- a/JavaScript Algorithms and Data Structures/01-Basic-JavaScript/10-JavaScript-Algorithms-and-Data-Structures-Projects/Telephone-Number-Validator.js +++ /dev/null @@ -1,10 +0,0 @@ -function telephoneCheck(str) { - const re = /^(1\s?)?\d{3}([-\s]?)\d{3}\2\d{4}$/; - const re2 = /^(1\s?)?\(\d{3}\)\s?\d{3}[-\s]\d{4}$/; - if (re.test(str)) { - return true; - } - else {return re2.test(str) ? true : false} -} - -telephoneCheck("555-555-5555"); From 12b3c00b72d80cee4b326cb5111d754c3f5eb0c1 Mon Sep 17 00:00:00 2001 From: Yasholo Date: Wed, 13 Sep 2023 15:28:31 +0530 Subject: [PATCH 3/7] Re-organised files and folders --- ...opes-of-the-var-and-let-Keywords_script.js | 9 ++ ...ate-an-Array-Declared-with-const_script.js | 9 ++ .../03.Prevent-Object-Mutation_script.js | 13 ++ ...rite-Concise-Anonymous-Functions_script.js | 3 + ...-Arrow-Functions-with-Parameters_script.js | 5 + ...lt-Parameters-for-Your-Functions_script.js | 1 + ...rameter-with-Function-Parameters_script.js | 4 + ...ator-to-Evaluate-Arrays-In-Place_script.js | 6 + ...t-to-Extract-Values-from-Objects_script.js | 8 ++ ...to-Assign-Variables-from-Objects_script.js | 8 ++ ...gn-Variables-from-Nested-Objects_script.js | 8 ++ ...-to-Assign-Variables-from-Arrays_script.js | 2 + ...meter-to-Reassign-Array-Elements_script.js | 7 + ...bject-as-a-Function's-Parameters_script.js | 11 ++ ...-Strings-using-Template-Literals_script.js | 15 ++ ...-Using-Object-Property-Shorthand_script.js | 1 + ...e-Declarative-Functions-with-ES6_script.js | 8 ++ ...to-Define-a-Constructor-Function_script.js | 8 ++ ...s-to-Control-Access-to-an-Object_script.js | 13 ++ .../20.Create-a-Module-Script_index.html | 5 + ...Use-export-to-Share-a-Code-Block_script.js | 7 + ...use-JavaScript-Code-Using-import_script.js | 5 + ...to-Import-Everything-from-a-File_script.js | 4 + ...ort-Fallback-with-export-default_script.js | 3 + .../25.Import-a-Default-Export_script.js | 3 + .../26.Create-a-JavaScript-Promise_script.js | 3 + ...-Promise-with-resolve-and-reject_script.js | 9 ++ ...le-a-Fulfilled-Promise-with-then_script.js | 14 ++ ...le-a-Rejected-Promise-with-catch_script.js | 14 ++ .../02-ES6/moverenamefile.sh | 16 +++ .../01.Using-the-Test-Method_script.js | 3 + .../02.Match-Literal-Strings_script.js | 3 + ...ing-with-Different-Possibilities_script.js | 3 + .../04.Ignore-Case-While-Matching_script.js | 3 + .../05.Extract-Matches_script.js | 3 + ...6.Find-More-Than-the-First-Match_script.js | 3 + .../07.Match-with-Wildcard-Period_script.js | 3 + ...ngle-with-Multiple-Possibilities_script.js | 3 + ...09.Match-Letters-of-the-Alphabet_script.js | 3 + ...bers-and-Letters-of-the-Alphabet_script.js | 3 + ...-Single-Characters-Not-Specified_script.js | 3 + ...ers-that-Occur-One-or-More-Times_script.js | 3 + ...rs-that-Occur-Zero-or-More-Times_script.js | 3 + ...nd-Characters-with-Lazy-Matching_script.js | 3 + ...-One-or-More-Criminals-in-a-Hunt_script.js | 1 + ....Match-Beginning-String-Patterns_script.js | 3 + .../17.Match-Ending-String-Patterns_script.js | 3 + ...18.Match-All-Letters-and-Numbers_script.js | 3 + .../20.Match-All-Numbers_script.js | 3 + .../21.Match-All-Non-Numbers_script.js | 3 + .../22.Restrict-Possible-Usernames_script.js | 3 + .../23.Match-Whitespace_script.js | 3 + ....Match-Non-Whitespace-Characters_script.js | 3 + ...pper-and-Lower-Number-of-Matches_script.js | 3 + ...Only-the-Lower-Number-of-Matches_script.js | 3 + ....Specify-Exact-Number-of-Matches_script.js | 3 + .../28.Check-for-All-or-None_script.js | 3 + ....Positive-and-Negative-Lookahead_script.js | 3 + ...For-Mixed-Grouping-of-Characters_script.js | 3 + ...se-Patterns-Using-Capture-Groups_script.js | 3 + ...ure-Groups-to-Search-and-Replace_script.js | 4 + ...ve-Whitespace-from-Start-and-End_script.js | 3 + ...erything-But-Letters-and-Numbers_script.js | 3 + ...to-Check-the-Value-of-a-Variable_script.js | 7 + ...freeCodeCamp-and-Browser-Console_script.js | 3 + ...-to-Check-the-Type-of-a-Variable_script.js | 5 + ...lled-Variable-and-Function-Names_script.js | 4 + ...heses-Brackets-Braces-and-Quotes_script.js | 3 + ...sage-of-Single-and-Double-Quotes_script.js | 2 + ...tor-Instead-of-Equality-Operator_script.js | 7 + ...arenthesis-After-a-Function-Call_script.js | 8 ++ ...ng-Order-When-Calling-a-Function_script.js | 8 ++ ...y-One-Errors-When-Using-Indexing_script.js | 9 ++ ...ializing-Variables-Inside-a-Loop_script.js | 16 +++ ...-with-a-Valid-Terminal-Condition_script.js | 5 + ...ay-to-Store-a-Collection-of-Data_script.js | 1 + ...n-Array-s-Using-Bracket-Notation_script.js | 3 + ...-Array-with-push()-and-unshift()_script.js | 7 + ...-an-Array-with-pop()-and-shift()_script.js | 7 + .../05.Remove-Items-Using-splice()_script.js | 4 + .../06.Add-Items-Using-splice()_script.js | 6 + ...7.Copy-Array-Items-Using-slice()_script.js | 6 + ...n-Array-with-the-Spread-Operator_script.js | 10 ++ ...-Arrays-with-the-Spread-Operator_script.js | 8 ++ ...nce-of-an-Element-With-indexOf()_script.js | 5 + ...an-Array's-Items-Using-For-Loops_script.js | 12 ++ ...complex-multi-dimensional-arrays_script.js | 7 + ...alue-Pairs-to-JavaScript-Objects_script.js | 11 ++ ...n-Object-Nested-Within-an-Object_script.js | 12 ++ ...erty-Names-with-Bracket-Notation_script.js | 14 ++ ...word-to-Remove-Object-Properties_script.js | 14 ++ ...heck-if-an-Object-has-a-Property_script.js | 30 ++++ ...n Object-with-a-for-in-Statement_script.js | 9 ++ ...l-Object-Keys-with-Object.keys()_script.js | 24 ++++ ...ify-an-Array-Stored-in-an-Object_script.js | 22 +++ ...01.Convert-Celsius-to-Fahrenheit_script.js | 6 + .../02.Reverse-a-String_script.js | 9 ++ .../03.Factorialize-a-Number_script.js | 12 ++ ...ind-the-Longest-Word-in-a-String_script.js | 15 ++ ...Return-Largest-Numbers-in-Arrays_script.js | 16 +++ .../06.Confirm-the-Ending_script.js | 7 + ....Repeat-a-String-Repeat-a-String_script.js | 9 ++ .../08.Truncate-a-String_script.js | 5 + .../09.Finders-Keepers_script.js | 12 ++ .../10.Boo-who_script.js | 5 + .../11.Title-Case-a-Sentence_script.js | 8 ++ .../12.Slice-and-Splice_script.js | 8 ++ .../13.Falsy-Bouncer_script.js | 7 + .../14.Where-do-I-Belong_script.js | 10 ++ .../15.Mutations_script.js | 8 ++ .../16.Chunky-Monkey_script.js | 16 +++ ...Create-a-Basic-JavaScript-Object_script.js | 4 + ...cess-the-Properties-of-an-Object_script.js | 6 + .../03.Create-a-Method-on-an-Object_script.js | 9 ++ ...e-Reusable-with-the-this-Keyword_script.js | 9 ++ ...05.Define-a-Constructor-Function_script.js | 5 + ...-a-Constructor-to-Create-Objects_script.js | 7 + ...onstructors-to-Receive-Arguments_script.js | 6 + ...ct's-Constructor-with-instanceof_script.js | 7 + .../09.Understand-Own-Properties_script.js | 13 ++ ...perties-to-Reduce-Duplicate-Code_script.js | 6 + .../11.Iterate-Over-All-Properties_script.js | 19 +++ ...erstand-the-Constructor-Property_script.js | 7 + ...ge-the-Prototype-to-a-New-Object_script.js | 13 ++ ...erty-when-Changing-the-Prototype_script.js | 14 ++ ...2\200\231s-Prototype-Comes-From_script.js" | 7 + ...6.Understand-the-Prototype-Chain_script.js | 8 ++ ...nce-So-You-Don't-Repeat-Yourself_script.js | 24 ++++ ...herit-Behaviors-from-a-Supertype_script.js | 11 ++ ...ype-to-an-Instance-of-the-Parent_script.js | 13 ++ ...n-Inherited-Constructor-Property_script.js | 12 ++ ...21.Add-Methods-After-Inheritance_script.js | 14 ++ .../22.Override-Inherited-Methods_script.js | 16 +++ ...havior-Between-Unrelated-Objects_script.js | 17 +++ ...t-from-Being-Modified-Externally_script.js | 7 + ...voked-Function-Expression-(IIFE)_script.js | 4 + ...6.Use-an-IIFE-to-Create-a-Module_script.js | 14 ++ .../01.Learn-About-Functional-Programming.js | 13 ++ ...tand-Functional-Programming-Terminology.js | 18 +++ ...nd-the-Hazards-of-Using-Imperative-Code.js | 44 ++++++ ...de-Effects-Using-Functional-Programming.js | 5 + ...Avoid-External-Dependence-in-a-Function.js | 5 + ...actor-Global-Variables-Out-of-Functions.js | 22 +++ ...ap-Method-to-Extract-Data-from-an-Array.js | 126 +++++++++++++++++ .../08.Implement-map-on-a-Prototype.js | 14 ++ ...er-Method-to-Extract-Data-from-an-Array.js | 126 +++++++++++++++++ ...lement-the-filter-Method-on-a-Prototype.js | 16 +++ ...Part-of-an-Array-Using-the-slice-Method.js | 6 + ...-an-Array-Using-slice-Instead-of-splice.js | 6 + ...bine-Two-Arrays-Using-the-concat-Method.js | 7 + ...f-an-Array-Using-concat-Instead-of-push.js | 7 + ...5.Use-the-reduce-Method-to-Analyze-Data.js | 131 ++++++++++++++++++ ...er-or-reduce-to-Solve-a-Complex-Problem.js | 8 ++ ...ay-Alphabetically-using-the-sort-Method.js | 5 + ...ray-Without-Changing-the-Original-Array.js | 7 + ...ng-into-an-Array-Using-the-split-Method.js | 5 + ...ray-into-a-String-Using-the-join-Method.js | 5 + ...ramming-to-Convert-Strings-to-URL-Slugs.js | 4 + ...ry-Element-in-an-Array-Meets-a-Criteria.js | 5 + ...ny-Elements-in-an-Array-Meet-a-Criteria.js | 5 + ...ion-to-Currying-and-Partial-Application.js | 9 ++ .../01.Sum-All-Numbers-in-a-Range.js | 20 +++ .../02.Diff-Two-Arrays.js | 7 + .../03.Seek-and-Destroy.js | 8 ++ .../04.Where-art-thou.js | 11 ++ .../05.Spinal-Tap-Case.js | 8 ++ .../06.Pig-Latin.js | 7 + .../07.Search-and-Replace.js | 10 ++ .../08.DNA-Pairing.js | 12 ++ .../09.Missing-letters.js | 11 ++ .../10.Sorted-Union.js | 15 ++ .../11.Convert-HTML-Entities.js | 29 ++++ .../12.Sum-All-Odd-Fibonacci-Numbers.js | 15 ++ .../13.Sum-All-Primes.js | 21 +++ .../14.Smallest-Common-Multiple.js | 16 +++ .../15.Drop-it.js | 10 ++ .../16.Steamroller.js | 17 +++ .../17.Binary-Agents.js | 12 ++ .../18.Everything-Be-True.js | 5 + .../19.Arguments-Optional.js | 23 +++ .../20.Make-a-Person.js | 30 ++++ .../21.Map-the-Debris.js | 20 +++ .../Caesars-Cipher.js | 23 +++ .../Cash-Register.js | 62 +++++++++ .../Palindrome-Checker.js | 15 ++ .../Roman-Numeral-Converter.js | 60 ++++++++ .../Telephone-Number-Validator.js | 10 ++ 187 files changed, 2110 insertions(+) create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/01.Compare-Scopes-of-the-var-and-let-Keywords_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/02.Mutate-an-Array-Declared-with-const_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/03.Prevent-Object-Mutation_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/04.Use-Arrow-Functions-to-Write-Concise-Anonymous-Functions_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/05.Write-Arrow-Functions-with-Parameters_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/06.Set-Default-Parameters-for-Your-Functions_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/07.Use-the-Rest-Parameter-with-Function-Parameters_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/08.Use-the-Spread-Operator-to-Evaluate-Arrays-In-Place_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/09.Use-Destructuring-Assignment-to-Extract-Values-from-Objects_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/10.Use-Destructuring-Assignment-to-Assign-Variables-from-Objects_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/11.Use-Destructuring-Assignment to-Assign-Variables-from-Nested-Objects_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/12.Use-Destructuring-Assignment-to-Assign-Variables-from-Arrays_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/13.Use-Destructuring-Assignment-with-the-Rest-Parameter-to-Reassign-Array-Elements_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/14.Use-Destructuring-Assignment-to-Pass-an-Object-as-a-Function's-Parameters_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/15.Create-Strings-using-Template-Literals_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/16.Write-Concise-Object-Literal-Declarations-Using-Object-Property-Shorthand_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/17.Write-Concise-Declarative-Functions-with-ES6_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/18.Use-class-Syntax-to-Define-a-Constructor-Function_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/19.Use-getters-and-setters-to-Control-Access-to-an-Object_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/20.Create-a-Module-Script_index.html create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/21.Use-export-to-Share-a-Code-Block_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/22.Reuse-JavaScript-Code-Using-import_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/23.Use-to-Import-Everything-from-a-File_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/24.Create-an-Export-Fallback-with-export-default_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/25.Import-a-Default-Export_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/26.Create-a-JavaScript-Promise_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/27.Complete-a-Promise-with-resolve-and-reject_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/28.Handle-a-Fulfilled-Promise-with-then_script.js create mode 100644 JavaScript Algorithms and Data Structures/02-ES6/29.Handle-a-Rejected-Promise-with-catch_script.js create mode 100755 JavaScript Algorithms and Data Structures/02-ES6/moverenamefile.sh create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/01.Using-the-Test-Method_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/02.Match-Literal-Strings_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/03.Match-a-Literal-String-with-Different-Possibilities_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/04.Ignore-Case-While-Matching_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/05.Extract-Matches_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/06.Find-More-Than-the-First-Match_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/07.Match-with-Wildcard-Period_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/08.Match-Single-with-Multiple-Possibilities_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/09.Match-Letters-of-the-Alphabet_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/10.Match-Numbers-and-Letters-of-the-Alphabet_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/11.Match-Single-Characters-Not-Specified_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/12.Match-Characters-that-Occur-One-or-More-Times_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/13.Match-Characters-that-Occur-Zero-or-More-Times_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/14.Find-Characters-with-Lazy-Matching_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/15.Find-One-or-More-Criminals-in-a-Hunt_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/16.Match-Beginning-String-Patterns_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/17.Match-Ending-String-Patterns_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/18.Match-All-Letters-and-Numbers_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/20.Match-All-Numbers_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/21.Match-All-Non-Numbers_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/22.Restrict-Possible-Usernames_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/23.Match-Whitespace_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/24.Match-Non-Whitespace-Characters_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/25.Specify Upper-and-Lower-Number-of-Matches_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/26.Specify-Only-the-Lower-Number-of-Matches_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/27.Specify-Exact-Number-of-Matches_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/28.Check-for-All-or-None_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/29.Positive-and-Negative-Lookahead_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/30.Check-For-Mixed-Grouping-of-Characters_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/31.Reuse-Patterns-Using-Capture-Groups_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/32.Use-Capture-Groups-to-Search-and-Replace_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/33.Remove-Whitespace-from-Start-and-End_script.js create mode 100644 JavaScript Algorithms and Data Structures/03-Regular-Expressions/Match Everything-But-Letters-and-Numbers_script.js create mode 100644 JavaScript Algorithms and Data Structures/04-Debugging/01.Use-the-JavaScript-Console-to-Check-the-Value-of-a-Variable_script.js create mode 100644 JavaScript Algorithms and Data Structures/04-Debugging/02.Understanding-the-Differences-between-the-freeCodeCamp-and-Browser-Console_script.js create mode 100644 JavaScript Algorithms and Data Structures/04-Debugging/03.Use-typeof-to-Check-the-Type-of-a-Variable_script.js create mode 100644 JavaScript Algorithms and Data Structures/04-Debugging/04.Catch-Misspelled-Variable-and-Function-Names_script.js create mode 100644 JavaScript Algorithms and Data Structures/04-Debugging/05.Catch-Unclosed-Parentheses-Brackets-Braces-and-Quotes_script.js create mode 100644 JavaScript Algorithms and Data Structures/04-Debugging/06.Catch-Mixed-Usage-of-Single-and-Double-Quotes_script.js create mode 100644 JavaScript Algorithms and Data Structures/04-Debugging/07.Catch-Use-of-Assignment-Operator-Instead-of-Equality-Operator_script.js create mode 100644 JavaScript Algorithms and Data Structures/04-Debugging/08.Catch-Missing-Open-and-Closing-Parenthesis-After-a-Function-Call_script.js create mode 100644 JavaScript Algorithms and Data Structures/04-Debugging/09.Catch-Arguments-Passed-in-the-Wrong-Order-When-Calling-a-Function_script.js create mode 100644 JavaScript Algorithms and Data Structures/04-Debugging/10.Catch-Off-By-One-Errors-When-Using-Indexing_script.js create mode 100644 JavaScript Algorithms and Data Structures/04-Debugging/11.Use-Caution-When-Reinitializing-Variables-Inside-a-Loop_script.js create mode 100644 JavaScript Algorithms and Data Structures/04-Debugging/12.Prevent-Infinite-Loops-with-a-Valid-Terminal-Condition_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/01.Use-an-Array-to-Store-a-Collection-of-Data_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/02.Access-an-Array-s-Using-Bracket-Notation_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/03.Add-Items-to-an-Array-with-push()-and-unshift()_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/04.Remove-Items-from-an-Array-with-pop()-and-shift()_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/05.Remove-Items-Using-splice()_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/06.Add-Items-Using-splice()_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/07.Copy-Array-Items-Using-slice()_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/08.Copy-an-Array-with-the-Spread-Operator_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/09.Combine-Arrays-with-the-Spread-Operator_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/10.Check-For-The-Presence-of-an-Element-With-indexOf()_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/11.Iterate-Through-All-an-Array's-Items-Using-For-Loops_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/12.Create-complex-multi-dimensional-arrays_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/13.Add-Key-Value-Pairs-to-JavaScript-Objects_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/14.Modify-an-Object-Nested-Within-an-Object_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/15.Access-Property-Names-with-Bracket-Notation_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/16.Use-the-delete-Keyword-to-Remove-Object-Properties_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/17.Check-if-an-Object-has-a-Property_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/18.Iterate-Through-the-Keys-of-an Object-with-a-for-in-Statement_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/19.Generate-an-Array-of-All-Object-Keys-with-Object.keys()_script.js create mode 100644 JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/20.Modify-an-Array-Stored-in-an-Object_script.js create mode 100644 JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/01.Convert-Celsius-to-Fahrenheit_script.js create mode 100644 JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/02.Reverse-a-String_script.js create mode 100644 JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/03.Factorialize-a-Number_script.js create mode 100644 JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/04.Find-the-Longest-Word-in-a-String_script.js create mode 100644 JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/05.Return-Largest-Numbers-in-Arrays_script.js create mode 100644 JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/06.Confirm-the-Ending_script.js create mode 100644 JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/07.Repeat-a-String-Repeat-a-String_script.js create mode 100644 JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/08.Truncate-a-String_script.js create mode 100644 JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/09.Finders-Keepers_script.js create mode 100644 JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/10.Boo-who_script.js create mode 100644 JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/11.Title-Case-a-Sentence_script.js create mode 100644 JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/12.Slice-and-Splice_script.js create mode 100644 JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/13.Falsy-Bouncer_script.js create mode 100644 JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/14.Where-do-I-Belong_script.js create mode 100644 JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/15.Mutations_script.js create mode 100644 JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/16.Chunky-Monkey_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/01.Create-a-Basic-JavaScript-Object_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/02.Use-Dot-Notation-to-Access-the-Properties-of-an-Object_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/03.Create-a-Method-on-an-Object_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/04.Make-Code-More-Reusable-with-the-this-Keyword_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/05.Define-a-Constructor-Function_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/06.Use-a-Constructor-to-Create-Objects_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/07.Extend-Constructors-to-Receive-Arguments_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/08.Verify-an-Object's-Constructor-with-instanceof_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/09.Understand-Own-Properties_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/10.Use-Prototype-Properties-to-Reduce-Duplicate-Code_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/11.Iterate-Over-All-Properties_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/12.Understand-the-Constructor-Property_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/13.Change-the-Prototype-to-a-New-Object_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/14.Remember-to-Set-the-Constructor-Property-when-Changing-the-Prototype_script.js create mode 100644 "JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/15.Understand-Where-an-Object\342\200\231s-Prototype-Comes-From_script.js" create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/16.Understand-the-Prototype-Chain_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/17.Use-Inheritance-So-You-Don't-Repeat-Yourself_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/18.Inherit-Behaviors-from-a-Supertype_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/19.Set-the-Child's-Prototype-to-an-Instance-of-the-Parent_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/20.Reset-an-Inherited-Constructor-Property_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/21.Add-Methods-After-Inheritance_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/22.Override-Inherited-Methods_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/23.Use-a-Mixin-to-Add-Common-Behavior-Between-Unrelated-Objects_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/24.Use-Closure-to-Protect-Properties-Within-an-Object-from-Being-Modified-Externally_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/25.Understand-the-Immediately-Invoked-Function-Expression-(IIFE)_script.js create mode 100644 JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/26.Use-an-IIFE-to-Create-a-Module_script.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/01.Learn-About-Functional-Programming.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/02.Understand-Functional-Programming-Terminology.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/03.Understand-the-Hazards-of-Using-Imperative-Code.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/04.Avoid-Mutations-and-Side-Effects-Using-Functional-Programming.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/05.Pass-Arguments-to-Avoid-External-Dependence-in-a-Function.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/06.Refactor-Global-Variables-Out-of-Functions.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/07.Use-the-map-Method-to-Extract-Data-from-an-Array.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/08.Implement-map-on-a-Prototype.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/09.Use-the-filter-Method-to-Extract-Data-from-an-Array.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/10.Implement-the-filter-Method-on-a-Prototype.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/11.Return-Part-of-an-Array-Using-the-slice-Method.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/12.Remove-Elements-from-an-Array-Using-slice-Instead-of-splice.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/13.Combine-Two-Arrays-Using-the-concat-Method.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/14.Add-Elements-to-the-End-of-an-Array-Using-concat-Instead-of-push.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/15.Use-the-reduce-Method-to-Analyze-Data.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/16.Use-Higher-Order-Functions-map-filter-or-reduce-to-Solve-a-Complex-Problem.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/17.Sort-an-Array-Alphabetically-using-the-sort-Method.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/18.Return-a-Sorted-Array-Without-Changing-the-Original-Array.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/19.Split-a-String-into-an-Array-Using-the-split-Method.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/20.Combine-an-Array-into-a-String-Using-the-join-Method.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/21.Apply-Functional-Programming-to-Convert-Strings-to-URL-Slugs.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/22.Use-the-every-Method-to-Check-that-Every-Element-in-an-Array-Meets-a-Criteria.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/23.Use-the-some-Method-to-Check-that-Any-Elements-in-an-Array-Meet-a-Criteria.js create mode 100644 JavaScript Algorithms and Data Structures/08-Functional-Programming/24.Introduction-to-Currying-and-Partial-Application.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/01.Sum-All-Numbers-in-a-Range.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/02.Diff-Two-Arrays.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/03.Seek-and-Destroy.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/04.Where-art-thou.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/05.Spinal-Tap-Case.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/06.Pig-Latin.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/07.Search-and-Replace.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/08.DNA-Pairing.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/09.Missing-letters.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/10.Sorted-Union.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/11.Convert-HTML-Entities.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/12.Sum-All-Odd-Fibonacci-Numbers.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/13.Sum-All-Primes.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/14.Smallest-Common-Multiple.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/15.Drop-it.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/16.Steamroller.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/17.Binary-Agents.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/18.Everything-Be-True.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/19.Arguments-Optional.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/20.Make-a-Person.js create mode 100644 JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/21.Map-the-Debris.js create mode 100644 JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Caesars-Cipher.js create mode 100644 JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Cash-Register.js create mode 100644 JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Palindrome-Checker.js create mode 100644 JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Roman-Numeral-Converter.js create mode 100644 JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Telephone-Number-Validator.js diff --git a/JavaScript Algorithms and Data Structures/02-ES6/01.Compare-Scopes-of-the-var-and-let-Keywords_script.js b/JavaScript Algorithms and Data Structures/02-ES6/01.Compare-Scopes-of-the-var-and-let-Keywords_script.js new file mode 100644 index 0000000..da24a2f --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/01.Compare-Scopes-of-the-var-and-let-Keywords_script.js @@ -0,0 +1,9 @@ +function checkScope() { + let i = 'function scope'; + if (true) { + let i = 'block scope'; + console.log('Block scope i is: ', i); + } + console.log('Function scope i is: ', i); + return i; + } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/02.Mutate-an-Array-Declared-with-const_script.js b/JavaScript Algorithms and Data Structures/02-ES6/02.Mutate-an-Array-Declared-with-const_script.js new file mode 100644 index 0000000..9bea0a7 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/02.Mutate-an-Array-Declared-with-const_script.js @@ -0,0 +1,9 @@ +const s = [5, 7, 2]; +function editInPlace() { + +s[0] = 2; +s[1] = 5; +s[2] = 7; +console.log(s); +} +editInPlace(); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/03.Prevent-Object-Mutation_script.js b/JavaScript Algorithms and Data Structures/02-ES6/03.Prevent-Object-Mutation_script.js new file mode 100644 index 0000000..bdc5a1c --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/03.Prevent-Object-Mutation_script.js @@ -0,0 +1,13 @@ +function freezeObj() { + const MATH_CONSTANTS = { + PI: 3.14 + }; + Object.freeze(MATH_CONSTANTS); + try { + MATH_CONSTANTS.PI = 99; + } catch(ex) { + console.log(ex); + } + return MATH_CONSTANTS.PI; + } + const PI = freezeObj(); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/04.Use-Arrow-Functions-to-Write-Concise-Anonymous-Functions_script.js b/JavaScript Algorithms and Data Structures/02-ES6/04.Use-Arrow-Functions-to-Write-Concise-Anonymous-Functions_script.js new file mode 100644 index 0000000..ac3a7ea --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/04.Use-Arrow-Functions-to-Write-Concise-Anonymous-Functions_script.js @@ -0,0 +1,3 @@ +const magic = () => { + return new Date(); + }; \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/05.Write-Arrow-Functions-with-Parameters_script.js b/JavaScript Algorithms and Data Structures/02-ES6/05.Write-Arrow-Functions-with-Parameters_script.js new file mode 100644 index 0000000..ebcecc7 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/05.Write-Arrow-Functions-with-Parameters_script.js @@ -0,0 +1,5 @@ +const myConcat = (arr1, arr2) => { + return arr1.concat(arr2); + }; + + console.log(myConcat([1, 2], [3, 4, 5])); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/06.Set-Default-Parameters-for-Your-Functions_script.js b/JavaScript Algorithms and Data Structures/02-ES6/06.Set-Default-Parameters-for-Your-Functions_script.js new file mode 100644 index 0000000..a06e510 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/06.Set-Default-Parameters-for-Your-Functions_script.js @@ -0,0 +1 @@ +const increment = (number, value = 1) => number + value; diff --git a/JavaScript Algorithms and Data Structures/02-ES6/07.Use-the-Rest-Parameter-with-Function-Parameters_script.js b/JavaScript Algorithms and Data Structures/02-ES6/07.Use-the-Rest-Parameter-with-Function-Parameters_script.js new file mode 100644 index 0000000..bcbe40f --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/07.Use-the-Rest-Parameter-with-Function-Parameters_script.js @@ -0,0 +1,4 @@ +const sum = (...args) => { + return args.reduce((a, b) => a + b, 0); + } + \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/08.Use-the-Spread-Operator-to-Evaluate-Arrays-In-Place_script.js b/JavaScript Algorithms and Data Structures/02-ES6/08.Use-the-Spread-Operator-to-Evaluate-Arrays-In-Place_script.js new file mode 100644 index 0000000..82029e4 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/08.Use-the-Spread-Operator-to-Evaluate-Arrays-In-Place_script.js @@ -0,0 +1,6 @@ +const arr1 = ['JAN', 'FEB', 'MAR', 'APR', 'MAY']; +let arr2; + +arr2 = [...arr1]; + +console.log(arr2); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/09.Use-Destructuring-Assignment-to-Extract-Values-from-Objects_script.js b/JavaScript Algorithms and Data Structures/02-ES6/09.Use-Destructuring-Assignment-to-Extract-Values-from-Objects_script.js new file mode 100644 index 0000000..fc6a038 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/09.Use-Destructuring-Assignment-to-Extract-Values-from-Objects_script.js @@ -0,0 +1,8 @@ +const HIGH_TEMPERATURES = { + yesterday: 75, + today: 77, + tomorrow: 80 + }; + + const {today, tomorrow} = HIGH_TEMPERATURES; + \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/10.Use-Destructuring-Assignment-to-Assign-Variables-from-Objects_script.js b/JavaScript Algorithms and Data Structures/02-ES6/10.Use-Destructuring-Assignment-to-Assign-Variables-from-Objects_script.js new file mode 100644 index 0000000..8ca971c --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/10.Use-Destructuring-Assignment-to-Assign-Variables-from-Objects_script.js @@ -0,0 +1,8 @@ +const HIGH_TEMPERATURES = { + yesterday: 75, + today: 77, + tomorrow: 80 + }; + + const { today: highToday, tomorrow: highTomorrow } = HIGH_TEMPERATURES; + \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/11.Use-Destructuring-Assignment to-Assign-Variables-from-Nested-Objects_script.js b/JavaScript Algorithms and Data Structures/02-ES6/11.Use-Destructuring-Assignment to-Assign-Variables-from-Nested-Objects_script.js new file mode 100644 index 0000000..797e5d4 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/11.Use-Destructuring-Assignment to-Assign-Variables-from-Nested-Objects_script.js @@ -0,0 +1,8 @@ +const LOCAL_FORECAST = { + yesterday: { low: 61, high: 75 }, + today: { low: 64, high: 77 }, + tomorrow: { low: 68, high: 80 } + }; + + const { today: { low: lowToday, high: highToday }} = LOCAL_FORECAST; + \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/12.Use-Destructuring-Assignment-to-Assign-Variables-from-Arrays_script.js b/JavaScript Algorithms and Data Structures/02-ES6/12.Use-Destructuring-Assignment-to-Assign-Variables-from-Arrays_script.js new file mode 100644 index 0000000..6061223 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/12.Use-Destructuring-Assignment-to-Assign-Variables-from-Arrays_script.js @@ -0,0 +1,2 @@ +let a = 8, b = 6; +[a, b] = [b, a]; \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/13.Use-Destructuring-Assignment-with-the-Rest-Parameter-to-Reassign-Array-Elements_script.js b/JavaScript Algorithms and Data Structures/02-ES6/13.Use-Destructuring-Assignment-with-the-Rest-Parameter-to-Reassign-Array-Elements_script.js new file mode 100644 index 0000000..09fc9ef --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/13.Use-Destructuring-Assignment-with-the-Rest-Parameter-to-Reassign-Array-Elements_script.js @@ -0,0 +1,7 @@ +const source = [1,2,3,4,5,6,7,8,9,10]; +function removeFirstTwo(list) { + + const [,,...arr] = list; + return arr; +} +const arr = removeFirstTwo(source); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/14.Use-Destructuring-Assignment-to-Pass-an-Object-as-a-Function's-Parameters_script.js b/JavaScript Algorithms and Data Structures/02-ES6/14.Use-Destructuring-Assignment-to-Pass-an-Object-as-a-Function's-Parameters_script.js new file mode 100644 index 0000000..69c5292 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/14.Use-Destructuring-Assignment-to-Pass-an-Object-as-a-Function's-Parameters_script.js @@ -0,0 +1,11 @@ +const stats = { + max: 56.78, + standard_deviation: 4.34, + median: 34.54, + mode: 23.87, + min: -0.75, + average: 35.85 + }; + + const half = ({ max, min }) => (max + min) / 2.0; + \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/15.Create-Strings-using-Template-Literals_script.js b/JavaScript Algorithms and Data Structures/02-ES6/15.Create-Strings-using-Template-Literals_script.js new file mode 100644 index 0000000..3bf931b --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/15.Create-Strings-using-Template-Literals_script.js @@ -0,0 +1,15 @@ +const result = { + success: ["max-length", "no-amd", "prefer-arrow-functions"], + failure: ["no-var", "var-on-top", "linebreak"], + skipped: ["no-extra-semi", "no-dup-keys"] + }; + function makeList(arr) { + const failureItems = []; + for (let i = 0; i < arr.length; i++) { + failureItems.push(`
  • ${arr[i]}
  • `); + } + + return failureItems; + } + + const failuresList = makeList(result.failure); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/16.Write-Concise-Object-Literal-Declarations-Using-Object-Property-Shorthand_script.js b/JavaScript Algorithms and Data Structures/02-ES6/16.Write-Concise-Object-Literal-Declarations-Using-Object-Property-Shorthand_script.js new file mode 100644 index 0000000..6604919 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/16.Write-Concise-Object-Literal-Declarations-Using-Object-Property-Shorthand_script.js @@ -0,0 +1 @@ +const createPerson = (name, age, gender) => ({name, age, gender}); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/17.Write-Concise-Declarative-Functions-with-ES6_script.js b/JavaScript Algorithms and Data Structures/02-ES6/17.Write-Concise-Declarative-Functions-with-ES6_script.js new file mode 100644 index 0000000..b7e72be --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/17.Write-Concise-Declarative-Functions-with-ES6_script.js @@ -0,0 +1,8 @@ +const bicycle = { + gear: 2, + setGear(newGear) { + this.gear = newGear; + } + }; + bicycle.setGear(3); + console.log(bicycle.gear); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/18.Use-class-Syntax-to-Define-a-Constructor-Function_script.js b/JavaScript Algorithms and Data Structures/02-ES6/18.Use-class-Syntax-to-Define-a-Constructor-Function_script.js new file mode 100644 index 0000000..f237421 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/18.Use-class-Syntax-to-Define-a-Constructor-Function_script.js @@ -0,0 +1,8 @@ +class Vegetable { + constructor(name) { + this.name = name; + } + } + + const carrot = new Vegetable('carrot'); + console.log(carrot.name); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/19.Use-getters-and-setters-to-Control-Access-to-an-Object_script.js b/JavaScript Algorithms and Data Structures/02-ES6/19.Use-getters-and-setters-to-Control-Access-to-an-Object_script.js new file mode 100644 index 0000000..3b73054 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/19.Use-getters-and-setters-to-Control-Access-to-an-Object_script.js @@ -0,0 +1,13 @@ +class Thermostat { + constructor(fahrenheit) { + this.fahrenheit = fahrenheit; + } + + get temperature() { + return (5 / 9) * (this.fahrenheit - 32); + } + + set temperature(celsius) { + this.fahrenheit = (celsius * 9.0) / 5 + 32; + } +} \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/20.Create-a-Module-Script_index.html b/JavaScript Algorithms and Data Structures/02-ES6/20.Create-a-Module-Script_index.html new file mode 100644 index 0000000..2034e05 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/20.Create-a-Module-Script_index.html @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/21.Use-export-to-Share-a-Code-Block_script.js b/JavaScript Algorithms and Data Structures/02-ES6/21.Use-export-to-Share-a-Code-Block_script.js new file mode 100644 index 0000000..e100437 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/21.Use-export-to-Share-a-Code-Block_script.js @@ -0,0 +1,7 @@ +export const uppercaseString = (string) => { + return string.toUpperCase(); + } + + export const lowercaseString = (string) => { + return string.toLowerCase() + } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/22.Reuse-JavaScript-Code-Using-import_script.js b/JavaScript Algorithms and Data Structures/02-ES6/22.Reuse-JavaScript-Code-Using-import_script.js new file mode 100644 index 0000000..92f951e --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/22.Reuse-JavaScript-Code-Using-import_script.js @@ -0,0 +1,5 @@ +import { uppercaseString } from './string_functions.js'; +import { lowercaseString } from './string_functions.js'; + +uppercaseString("hello"); +lowercaseString("WORLD!"); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/23.Use-to-Import-Everything-from-a-File_script.js b/JavaScript Algorithms and Data Structures/02-ES6/23.Use-to-Import-Everything-from-a-File_script.js new file mode 100644 index 0000000..e8ae9ba --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/23.Use-to-Import-Everything-from-a-File_script.js @@ -0,0 +1,4 @@ +import * as stringFunctions from "./string_functions.js"; + +stringFunctions.uppercaseString("hello"); +stringFunctions.lowercaseString("WORLD!"); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/24.Create-an-Export-Fallback-with-export-default_script.js b/JavaScript Algorithms and Data Structures/02-ES6/24.Create-an-Export-Fallback-with-export-default_script.js new file mode 100644 index 0000000..fc0c2e9 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/24.Create-an-Export-Fallback-with-export-default_script.js @@ -0,0 +1,3 @@ +export default function subtract(x, y) { + return x - y; + } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/25.Import-a-Default-Export_script.js b/JavaScript Algorithms and Data Structures/02-ES6/25.Import-a-Default-Export_script.js new file mode 100644 index 0000000..32d9e1d --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/25.Import-a-Default-Export_script.js @@ -0,0 +1,3 @@ +import subtract from "./math_functions.js"; + +subtract(7,4); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/26.Create-a-JavaScript-Promise_script.js b/JavaScript Algorithms and Data Structures/02-ES6/26.Create-a-JavaScript-Promise_script.js new file mode 100644 index 0000000..b7839cf --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/26.Create-a-JavaScript-Promise_script.js @@ -0,0 +1,3 @@ +const makeServerRequest = new Promise((resolve, reject) => { + +}); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/27.Complete-a-Promise-with-resolve-and-reject_script.js b/JavaScript Algorithms and Data Structures/02-ES6/27.Complete-a-Promise-with-resolve-and-reject_script.js new file mode 100644 index 0000000..f25e91a --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/27.Complete-a-Promise-with-resolve-and-reject_script.js @@ -0,0 +1,9 @@ +const makeServerRequest = new Promise((resolve, reject) => { + + let responseFromServer; + if(responseFromServer) { + resolve("We got the data"); + } else { + reject("Data not received"); + } + }); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/28.Handle-a-Fulfilled-Promise-with-then_script.js b/JavaScript Algorithms and Data Structures/02-ES6/28.Handle-a-Fulfilled-Promise-with-then_script.js new file mode 100644 index 0000000..b5fa0db --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/28.Handle-a-Fulfilled-Promise-with-then_script.js @@ -0,0 +1,14 @@ +const makeServerRequest = new Promise((resolve, reject) => { + + let responseFromServer = true; + + if(responseFromServer) { + resolve("We got the data"); + } else { + reject("Data not received"); + } + }); + + makeServerRequest.then(result => { + console.log(result); + }); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/29.Handle-a-Rejected-Promise-with-catch_script.js b/JavaScript Algorithms and Data Structures/02-ES6/29.Handle-a-Rejected-Promise-with-catch_script.js new file mode 100644 index 0000000..6118e47 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/29.Handle-a-Rejected-Promise-with-catch_script.js @@ -0,0 +1,14 @@ +const makeServerRequest = new Promise((resolve, reject) => { + + let responseFromServer = false; + + if(responseFromServer) { + resolve("We got the data"); + } else { + reject("Data not received"); + } + }); + + makeServerRequest.catch(error => { + console.log(error ); + }); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/02-ES6/moverenamefile.sh b/JavaScript Algorithms and Data Structures/02-ES6/moverenamefile.sh new file mode 100755 index 0000000..ed10760 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/02-ES6/moverenamefile.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Define the parent directory +parent_directory="/mnt/a57ccb77-a765-4dca-b87c-b337ac842dee/Sharedvm/FreeCodeCamp-JavaScript-Algorithms-and-Data-Structures/ES6" + +# Define the destination directory +destination_directory="/mnt/a57ccb77-a765-4dca-b87c-b337ac842dee/Sharedvm/FreeCodeCamp-JavaScript-Algorithms-and-Data-Structures/nf" + +# Iterate through directories in the parent directory +for dir in "$parent_directory"/*/; do + # Extract the directory name + dirname=$(basename "$dir") + + # Move files from each directory to the destination directory and rename them + find "$dir" -type f -exec bash -c 'mv "$1" "$2"/"$3_${1##*/}"' bash {} "$destination_directory" "$dirname" \; +done diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/01.Using-the-Test-Method_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/01.Using-the-Test-Method_script.js new file mode 100644 index 0000000..04effaf --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/01.Using-the-Test-Method_script.js @@ -0,0 +1,3 @@ +let myString = "Hello, World!"; +let myRegex = /Hello/; +let result = myRegex.test(myString); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/02.Match-Literal-Strings_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/02.Match-Literal-Strings_script.js new file mode 100644 index 0000000..76b7ae8 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/02.Match-Literal-Strings_script.js @@ -0,0 +1,3 @@ +let waldoIsHiding = "Somewhere Waldo is hiding in this text."; +let waldoRegex = /Waldo/; +let result = waldoRegex.test(waldoIsHiding); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/03.Match-a-Literal-String-with-Different-Possibilities_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/03.Match-a-Literal-String-with-Different-Possibilities_script.js new file mode 100644 index 0000000..9d0bbc3 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/03.Match-a-Literal-String-with-Different-Possibilities_script.js @@ -0,0 +1,3 @@ +let petString = "James has a pet cat."; +let petRegex = /cat|dog|fish|bird/; +let result = petRegex.test(petString); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/04.Ignore-Case-While-Matching_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/04.Ignore-Case-While-Matching_script.js new file mode 100644 index 0000000..60a41e1 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/04.Ignore-Case-While-Matching_script.js @@ -0,0 +1,3 @@ +let myString = "freeCodeCamp"; +let fccRegex = /freeCodeCamp/i; +let result = fccRegex.test(myString); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/05.Extract-Matches_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/05.Extract-Matches_script.js new file mode 100644 index 0000000..bb6b00a --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/05.Extract-Matches_script.js @@ -0,0 +1,3 @@ +let extractStr = "Extract the word 'coding' from this string."; +let codingRegex = /coding/; +let result = extractStr.match(codingRegex); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/06.Find-More-Than-the-First-Match_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/06.Find-More-Than-the-First-Match_script.js new file mode 100644 index 0000000..2e9f021 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/06.Find-More-Than-the-First-Match_script.js @@ -0,0 +1,3 @@ +let twinkleStar = "Twinkle, twinkle, little star"; +let starRegex = /twinkle/ig; +let result = twinkleStar.match(starRegex); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/07.Match-with-Wildcard-Period_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/07.Match-with-Wildcard-Period_script.js new file mode 100644 index 0000000..af092a4 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/07.Match-with-Wildcard-Period_script.js @@ -0,0 +1,3 @@ +let exampleStr = "Let's have fun with regular expressions!"; +let unRegex = /.un/; +let result = unRegex.test(exampleStr); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/08.Match-Single-with-Multiple-Possibilities_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/08.Match-Single-with-Multiple-Possibilities_script.js new file mode 100644 index 0000000..be76cd9 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/08.Match-Single-with-Multiple-Possibilities_script.js @@ -0,0 +1,3 @@ +let quoteSample = "Beware of bugs in the above code; I have only proved it correct, not tried it."; +let vowelRegex = /[aeiou]/gi; +let result = quoteSample.match(vowelRegex); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/09.Match-Letters-of-the-Alphabet_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/09.Match-Letters-of-the-Alphabet_script.js new file mode 100644 index 0000000..136f59d --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/09.Match-Letters-of-the-Alphabet_script.js @@ -0,0 +1,3 @@ +let quoteSample = "The quick brown fox jumps over the lazy dog."; +let alphabetRegex = /[a-z]/gi; +let result = quoteSample.match(alphabetRegex) \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/10.Match-Numbers-and-Letters-of-the-Alphabet_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/10.Match-Numbers-and-Letters-of-the-Alphabet_script.js new file mode 100644 index 0000000..d9c3408 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/10.Match-Numbers-and-Letters-of-the-Alphabet_script.js @@ -0,0 +1,3 @@ +let quoteSample = "Blueberry 3.141592653s are delicious."; +let myRegex = /[h-s2-6]/ig; +let result = quoteSample.match(myRegex); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/11.Match-Single-Characters-Not-Specified_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/11.Match-Single-Characters-Not-Specified_script.js new file mode 100644 index 0000000..eb94001 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/11.Match-Single-Characters-Not-Specified_script.js @@ -0,0 +1,3 @@ +let quoteSample = "3 blind mice."; +let myRegex = /[^aeiou0-9]/ig; +let result = quoteSample.match(myRegex); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/12.Match-Characters-that-Occur-One-or-More-Times_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/12.Match-Characters-that-Occur-One-or-More-Times_script.js new file mode 100644 index 0000000..480609b --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/12.Match-Characters-that-Occur-One-or-More-Times_script.js @@ -0,0 +1,3 @@ +let difficultSpelling = "Mississippi"; +let myRegex = /s+/ig; +let result = difficultSpelling.match(myRegex); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/13.Match-Characters-that-Occur-Zero-or-More-Times_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/13.Match-Characters-that-Occur-Zero-or-More-Times_script.js new file mode 100644 index 0000000..5e5e3c3 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/13.Match-Characters-that-Occur-Zero-or-More-Times_script.js @@ -0,0 +1,3 @@ +let chewieRegex = /A+a*/; + +let result = chewieQuote.match(chewieRegex); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/14.Find-Characters-with-Lazy-Matching_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/14.Find-Characters-with-Lazy-Matching_script.js new file mode 100644 index 0000000..2d9d8fb --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/14.Find-Characters-with-Lazy-Matching_script.js @@ -0,0 +1,3 @@ +let text = "

    Winter is coming

    "; +let myRegex = /<.*?>/; +let result = text.match(myRegex); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/15.Find-One-or-More-Criminals-in-a-Hunt_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/15.Find-One-or-More-Criminals-in-a-Hunt_script.js new file mode 100644 index 0000000..79fe5eb --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/15.Find-One-or-More-Criminals-in-a-Hunt_script.js @@ -0,0 +1 @@ +let reCriminals = /C+/; \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/16.Match-Beginning-String-Patterns_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/16.Match-Beginning-String-Patterns_script.js new file mode 100644 index 0000000..6944360 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/16.Match-Beginning-String-Patterns_script.js @@ -0,0 +1,3 @@ +let rickyAndCal = "Cal and Ricky both like racing."; +let calRegex = /^Cal/; +let result = calRegex.test(rickyAndCal); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/17.Match-Ending-String-Patterns_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/17.Match-Ending-String-Patterns_script.js new file mode 100644 index 0000000..88e3093 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/17.Match-Ending-String-Patterns_script.js @@ -0,0 +1,3 @@ +let caboose = "The last car on a train is the caboose"; +let lastRegex = /caboose$/; +let result = lastRegex.test(caboose); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/18.Match-All-Letters-and-Numbers_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/18.Match-All-Letters-and-Numbers_script.js new file mode 100644 index 0000000..843b355 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/18.Match-All-Letters-and-Numbers_script.js @@ -0,0 +1,3 @@ +let quoteSample = "The five boxing wizards jump quickly."; +let alphabetRegexV2 = /\w/g; +let result = quoteSample.match(alphabetRegexV2).length; \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/20.Match-All-Numbers_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/20.Match-All-Numbers_script.js new file mode 100644 index 0000000..346d5bc --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/20.Match-All-Numbers_script.js @@ -0,0 +1,3 @@ +let movieName = "2001: A Space Odyssey"; +let numRegex = /\d/g; +let result = movieName.match(numRegex).length; \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/21.Match-All-Non-Numbers_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/21.Match-All-Non-Numbers_script.js new file mode 100644 index 0000000..4633194 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/21.Match-All-Non-Numbers_script.js @@ -0,0 +1,3 @@ +let movieName = "2001: A Space Odyssey"; +let noNumRegex = /\D/g; +let result = movieName.match(noNumRegex).length; \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/22.Restrict-Possible-Usernames_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/22.Restrict-Possible-Usernames_script.js new file mode 100644 index 0000000..2006f81 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/22.Restrict-Possible-Usernames_script.js @@ -0,0 +1,3 @@ +let username = "JackOfAllTrades"; +let userCheck = /^[a-z][a-z]+\d*$|^[a-z]\d\d+$/i; +let result = userCheck.test(username); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/23.Match-Whitespace_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/23.Match-Whitespace_script.js new file mode 100644 index 0000000..21c454a --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/23.Match-Whitespace_script.js @@ -0,0 +1,3 @@ +let sample = "Whitespace is important in separating words"; +let countWhiteSpace = /\s/g; +let result = sample.match(countWhiteSpace); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/24.Match-Non-Whitespace-Characters_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/24.Match-Non-Whitespace-Characters_script.js new file mode 100644 index 0000000..631579b --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/24.Match-Non-Whitespace-Characters_script.js @@ -0,0 +1,3 @@ +let sample = "Whitespace is important in separating words"; +let countNonWhiteSpace = /\S/g; +let result = sample.match(countNonWhiteSpace); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/25.Specify Upper-and-Lower-Number-of-Matches_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/25.Specify Upper-and-Lower-Number-of-Matches_script.js new file mode 100644 index 0000000..34d0bc0 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/25.Specify Upper-and-Lower-Number-of-Matches_script.js @@ -0,0 +1,3 @@ +let ohStr = "Ohhh no"; +let ohRegex = /Oh{3,6}\sno/; +let result = ohRegex.test(ohStr); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/26.Specify-Only-the-Lower-Number-of-Matches_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/26.Specify-Only-the-Lower-Number-of-Matches_script.js new file mode 100644 index 0000000..7cb13f7 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/26.Specify-Only-the-Lower-Number-of-Matches_script.js @@ -0,0 +1,3 @@ +let haStr = "Hazzzzah"; +let haRegex = /Haz{4,}ah/; +let result = haRegex.test(haStr); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/27.Specify-Exact-Number-of-Matches_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/27.Specify-Exact-Number-of-Matches_script.js new file mode 100644 index 0000000..40e58f0 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/27.Specify-Exact-Number-of-Matches_script.js @@ -0,0 +1,3 @@ +let timStr = "Timmmmber"; +let timRegex = /Tim{4}ber/; +let result = timRegex.test(timStr); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/28.Check-for-All-or-None_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/28.Check-for-All-or-None_script.js new file mode 100644 index 0000000..7ca4872 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/28.Check-for-All-or-None_script.js @@ -0,0 +1,3 @@ +let favWord = "favorite"; +let favRegex = /favou?rite/; +let result = favRegex.test(favWord); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/29.Positive-and-Negative-Lookahead_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/29.Positive-and-Negative-Lookahead_script.js new file mode 100644 index 0000000..64ef8bd --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/29.Positive-and-Negative-Lookahead_script.js @@ -0,0 +1,3 @@ +let sampleWord = "astronaut"; +let pwRegex = /(?=\w{6})(?=\w*\d{2})/; +let result = pwRegex.test(sampleWord); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/30.Check-For-Mixed-Grouping-of-Characters_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/30.Check-For-Mixed-Grouping-of-Characters_script.js new file mode 100644 index 0000000..dcdf490 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/30.Check-For-Mixed-Grouping-of-Characters_script.js @@ -0,0 +1,3 @@ +let myString = "Eleanor Roosevelt"; +let myRegex = /(Franklin|Eleanor).*Roosevelt/; +let result = myRegex.test(myString); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/31.Reuse-Patterns-Using-Capture-Groups_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/31.Reuse-Patterns-Using-Capture-Groups_script.js new file mode 100644 index 0000000..51e6141 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/31.Reuse-Patterns-Using-Capture-Groups_script.js @@ -0,0 +1,3 @@ +let repeatNum = "42 42 42"; +let reRegex = /^(\d+)\s\1\s\1$/; +let result = reRegex.test(repeatNum); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/32.Use-Capture-Groups-to-Search-and-Replace_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/32.Use-Capture-Groups-to-Search-and-Replace_script.js new file mode 100644 index 0000000..6d27690 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/32.Use-Capture-Groups-to-Search-and-Replace_script.js @@ -0,0 +1,4 @@ +let str = "one two three"; +let fixRegex = /(\w+)\s(\w+)\s(\w+)/; +let replaceText = "$3 $2 $1"; +let result = str.replace(fixRegex, replaceText); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/33.Remove-Whitespace-from-Start-and-End_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/33.Remove-Whitespace-from-Start-and-End_script.js new file mode 100644 index 0000000..4ae6932 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/33.Remove-Whitespace-from-Start-and-End_script.js @@ -0,0 +1,3 @@ +let hello = " Hello, World! "; +let wsRegex = /^\s+|\s+$/g; +let result = hello.replace(wsRegex, ""); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/03-Regular-Expressions/Match Everything-But-Letters-and-Numbers_script.js b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/Match Everything-But-Letters-and-Numbers_script.js new file mode 100644 index 0000000..1b4c83a --- /dev/null +++ b/JavaScript Algorithms and Data Structures/03-Regular-Expressions/Match Everything-But-Letters-and-Numbers_script.js @@ -0,0 +1,3 @@ +let quoteSample = "The five boxing wizards jump quickly."; +let nonAlphabetRegex = /\W/g; +let result = quoteSample.match(nonAlphabetRegex).length; \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/04-Debugging/01.Use-the-JavaScript-Console-to-Check-the-Value-of-a-Variable_script.js b/JavaScript Algorithms and Data Structures/04-Debugging/01.Use-the-JavaScript-Console-to-Check-the-Value-of-a-Variable_script.js new file mode 100644 index 0000000..bd4d997 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/04-Debugging/01.Use-the-JavaScript-Console-to-Check-the-Value-of-a-Variable_script.js @@ -0,0 +1,7 @@ +let a = 5; +let b = 1; +a++; + + +let sumAB = a + b; +console.log(a); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/04-Debugging/02.Understanding-the-Differences-between-the-freeCodeCamp-and-Browser-Console_script.js b/JavaScript Algorithms and Data Structures/04-Debugging/02.Understanding-the-Differences-between-the-freeCodeCamp-and-Browser-Console_script.js new file mode 100644 index 0000000..2c83fa6 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/04-Debugging/02.Understanding-the-Differences-between-the-freeCodeCamp-and-Browser-Console_script.js @@ -0,0 +1,3 @@ +let output = "Get this to show once in the freeCodeCamp console and not at all in the browser console"; +console.log(output); +console.clear(); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/04-Debugging/03.Use-typeof-to-Check-the-Type-of-a-Variable_script.js b/JavaScript Algorithms and Data Structures/04-Debugging/03.Use-typeof-to-Check-the-Type-of-a-Variable_script.js new file mode 100644 index 0000000..486af3d --- /dev/null +++ b/JavaScript Algorithms and Data Structures/04-Debugging/03.Use-typeof-to-Check-the-Type-of-a-Variable_script.js @@ -0,0 +1,5 @@ +let seven = 7; +let three = "3"; +console.log(seven + three); +console.log(typeof seven); +console.log(typeof three); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/04-Debugging/04.Catch-Misspelled-Variable-and-Function-Names_script.js b/JavaScript Algorithms and Data Structures/04-Debugging/04.Catch-Misspelled-Variable-and-Function-Names_script.js new file mode 100644 index 0000000..f75b340 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/04-Debugging/04.Catch-Misspelled-Variable-and-Function-Names_script.js @@ -0,0 +1,4 @@ +let receivables = 10; +let payables = 8; +let netWorkingCapital = receivables - payables; +console.log(`Net working capital is: ${netWorkingCapital}`); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/04-Debugging/05.Catch-Unclosed-Parentheses-Brackets-Braces-and-Quotes_script.js b/JavaScript Algorithms and Data Structures/04-Debugging/05.Catch-Unclosed-Parentheses-Brackets-Braces-and-Quotes_script.js new file mode 100644 index 0000000..5c5722a --- /dev/null +++ b/JavaScript Algorithms and Data Structures/04-Debugging/05.Catch-Unclosed-Parentheses-Brackets-Braces-and-Quotes_script.js @@ -0,0 +1,3 @@ +let myArray = [1, 2, 3]; + let arraySum = myArray.reduce((previous, current) => previous + current); + console.log(`Sum of array values is: ${arraySum}`); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/04-Debugging/06.Catch-Mixed-Usage-of-Single-and-Double-Quotes_script.js b/JavaScript Algorithms and Data Structures/04-Debugging/06.Catch-Mixed-Usage-of-Single-and-Double-Quotes_script.js new file mode 100644 index 0000000..13d9f57 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/04-Debugging/06.Catch-Mixed-Usage-of-Single-and-Double-Quotes_script.js @@ -0,0 +1,2 @@ +let innerHtml = "

    Click here to return home

    "; +console.log(innerHtml); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/04-Debugging/07.Catch-Use-of-Assignment-Operator-Instead-of-Equality-Operator_script.js b/JavaScript Algorithms and Data Structures/04-Debugging/07.Catch-Use-of-Assignment-Operator-Instead-of-Equality-Operator_script.js new file mode 100644 index 0000000..169c7d1 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/04-Debugging/07.Catch-Use-of-Assignment-Operator-Instead-of-Equality-Operator_script.js @@ -0,0 +1,7 @@ +let x = 7; +let y = 9; +let result = "to come"; + +result = x === y ? "Equl!" : "Not equal!" + +console.log(result); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/04-Debugging/08.Catch-Missing-Open-and-Closing-Parenthesis-After-a-Function-Call_script.js b/JavaScript Algorithms and Data Structures/04-Debugging/08.Catch-Missing-Open-and-Closing-Parenthesis-After-a-Function-Call_script.js new file mode 100644 index 0000000..28206d1 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/04-Debugging/08.Catch-Missing-Open-and-Closing-Parenthesis-After-a-Function-Call_script.js @@ -0,0 +1,8 @@ +function getNine() { + let x = 6; + let y = 3; + return x + y; + } + + let result = getNine(); + console.log(result); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/04-Debugging/09.Catch-Arguments-Passed-in-the-Wrong-Order-When-Calling-a-Function_script.js b/JavaScript Algorithms and Data Structures/04-Debugging/09.Catch-Arguments-Passed-in-the-Wrong-Order-When-Calling-a-Function_script.js new file mode 100644 index 0000000..0415dcf --- /dev/null +++ b/JavaScript Algorithms and Data Structures/04-Debugging/09.Catch-Arguments-Passed-in-the-Wrong-Order-When-Calling-a-Function_script.js @@ -0,0 +1,8 @@ +function raiseToPower(b, e) { + return Math.pow(b, e); + } + + let base = 2; + let exp = 3; + let power = raiseToPower(base, exp); + console.log(power); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/04-Debugging/10.Catch-Off-By-One-Errors-When-Using-Indexing_script.js b/JavaScript Algorithms and Data Structures/04-Debugging/10.Catch-Off-By-One-Errors-When-Using-Indexing_script.js new file mode 100644 index 0000000..3d51787 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/04-Debugging/10.Catch-Off-By-One-Errors-When-Using-Indexing_script.js @@ -0,0 +1,9 @@ +function countToFive() { + let firstFive = "12345"; + let len = firstFive.length; + for (let i = 0; i < len; i++) { + console.log(firstFive[i]); + } + } + + countToFive(); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/04-Debugging/11.Use-Caution-When-Reinitializing-Variables-Inside-a-Loop_script.js b/JavaScript Algorithms and Data Structures/04-Debugging/11.Use-Caution-When-Reinitializing-Variables-Inside-a-Loop_script.js new file mode 100644 index 0000000..771c17d --- /dev/null +++ b/JavaScript Algorithms and Data Structures/04-Debugging/11.Use-Caution-When-Reinitializing-Variables-Inside-a-Loop_script.js @@ -0,0 +1,16 @@ +function zeroArray(m, n) { + let newArray = []; + for (let i = 0; i < m; i++) { + let row = []; + + for (let j = 0; j < n; j++) { + row.push(0); + } + newArray.push(row); + } + return newArray; + } + + let matrix = zeroArray(3, 2); + console.log(matrix); + \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/04-Debugging/12.Prevent-Infinite-Loops-with-a-Valid-Terminal-Condition_script.js b/JavaScript Algorithms and Data Structures/04-Debugging/12.Prevent-Infinite-Loops-with-a-Valid-Terminal-Condition_script.js new file mode 100644 index 0000000..3edcf42 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/04-Debugging/12.Prevent-Infinite-Loops-with-a-Valid-Terminal-Condition_script.js @@ -0,0 +1,5 @@ +function myFunc() { + for (let i = 1; i <= 4; i += 2) { + console.log("Still going!"); + } + } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/01.Use-an-Array-to-Store-a-Collection-of-Data_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/01.Use-an-Array-to-Store-a-Collection-of-Data_script.js new file mode 100644 index 0000000..41a22b4 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/01.Use-an-Array-to-Store-a-Collection-of-Data_script.js @@ -0,0 +1 @@ +let yourArray = ['one', 2, 'three', true, false, undefined, null] diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/02.Access-an-Array-s-Using-Bracket-Notation_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/02.Access-an-Array-s-Using-Bracket-Notation_script.js new file mode 100644 index 0000000..6971804 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/02.Access-an-Array-s-Using-Bracket-Notation_script.js @@ -0,0 +1,3 @@ +let myArray = ["a", "b", "c", "d"]; +myArray[1] = "g" +console.log(myArray); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/03.Add-Items-to-an-Array-with-push()-and-unshift()_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/03.Add-Items-to-an-Array-with-push()-and-unshift()_script.js new file mode 100644 index 0000000..953b02b --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/03.Add-Items-to-an-Array-with-push()-and-unshift()_script.js @@ -0,0 +1,7 @@ +function mixedNumbers(arr) { + arr.unshift("I", 2, "three"); + arr.push(7, "VIII", 9); + return arr; +} + +console.log(mixedNumbers(['IV', 5, 'six'])); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/04.Remove-Items-from-an-Array-with-pop()-and-shift()_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/04.Remove-Items-from-an-Array-with-pop()-and-shift()_script.js new file mode 100644 index 0000000..8085ca8 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/04.Remove-Items-from-an-Array-with-pop()-and-shift()_script.js @@ -0,0 +1,7 @@ +function popShift(arr) { + let popped = arr.pop(); + let shifted = arr.shift(); + return [shifted, popped]; + } + + console.log(popShift(['challenge', 'is', 'not', 'complete'])); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/05.Remove-Items-Using-splice()_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/05.Remove-Items-Using-splice()_script.js new file mode 100644 index 0000000..95787f2 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/05.Remove-Items-Using-splice()_script.js @@ -0,0 +1,4 @@ +const arr = [2, 4, 5, 1, 7, 5, 2, 1]; +arr.splice(2, 1); +arr.splice(3, 2); +console.log(arr); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/06.Add-Items-Using-splice()_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/06.Add-Items-Using-splice()_script.js new file mode 100644 index 0000000..d15a6b2 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/06.Add-Items-Using-splice()_script.js @@ -0,0 +1,6 @@ +function htmlColorNames(arr) { + arr.splice(0, 2, 'DarkSalmon', 'BlanchedAlmond'); + return arr; + } + + console.log(htmlColorNames(['DarkGoldenRod', 'WhiteSmoke', 'LavenderBlush', 'PaleTurquoise', 'FireBrick'])); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/07.Copy-Array-Items-Using-slice()_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/07.Copy-Array-Items-Using-slice()_script.js new file mode 100644 index 0000000..b3f029c --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/07.Copy-Array-Items-Using-slice()_script.js @@ -0,0 +1,6 @@ +function forecast(arr) { + arr = arr.slice(2, 4); + return arr; + } + + console.log(forecast(['cold', 'rainy', 'warm', 'sunny', 'cool', 'thunderstorms'])); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/08.Copy-an-Array-with-the-Spread-Operator_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/08.Copy-an-Array-with-the-Spread-Operator_script.js new file mode 100644 index 0000000..c35a510 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/08.Copy-an-Array-with-the-Spread-Operator_script.js @@ -0,0 +1,10 @@ +function copyMachine(arr, num) { + let newArr = []; + while (num >= 1) { + newArr.push([...arr]); + num--; + } + return newArr; + } + + console.log(copyMachine([true, false, true], 2)); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/09.Combine-Arrays-with-the-Spread-Operator_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/09.Combine-Arrays-with-the-Spread-Operator_script.js new file mode 100644 index 0000000..7e7fd6e --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/09.Combine-Arrays-with-the-Spread-Operator_script.js @@ -0,0 +1,8 @@ +function spreadOut() { + let fragment = ['to', 'code']; + let sentence = ['learning', ...fragment, 'is', 'fun']; + + return sentence; + } + + console.log(spreadOut()); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/10.Check-For-The-Presence-of-an-Element-With-indexOf()_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/10.Check-For-The-Presence-of-an-Element-With-indexOf()_script.js new file mode 100644 index 0000000..75a333d --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/10.Check-For-The-Presence-of-an-Element-With-indexOf()_script.js @@ -0,0 +1,5 @@ +function quickCheck(arr, elem) { + return arr.indexOf(elem) < 0 ? false : true; + } + + console.log(quickCheck(['squash', 'onions', 'shallots'], 'mushrooms')); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/11.Iterate-Through-All-an-Array's-Items-Using-For-Loops_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/11.Iterate-Through-All-an-Array's-Items-Using-For-Loops_script.js new file mode 100644 index 0000000..b91ac0e --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/11.Iterate-Through-All-an-Array's-Items-Using-For-Loops_script.js @@ -0,0 +1,12 @@ +function filteredArray(arr, elem) { + let newArr = []; + + for (let i = 0; i < arr.length; i++) { + if (arr[i].indexOf(elem) == -1) { + newArr.push(arr[i]); + } + } + + return newArr; + } + \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/12.Create-complex-multi-dimensional-arrays_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/12.Create-complex-multi-dimensional-arrays_script.js new file mode 100644 index 0000000..7fa28f4 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/12.Create-complex-multi-dimensional-arrays_script.js @@ -0,0 +1,7 @@ +let myNestedArray = [ + ["unshift", false, 1, 2, 3, "complex", "nested"], + ["loop", "shift", 6, 7, 1000, "method"], + ["concat", false, true, "spread", "array", ["deep"]], + ["mutate", 1327.98, "splice", "slice", "push", [["deeper"]]], + ["iterate", 1.3849, 7, "8.4876", "arbitrary", "depth", [[["deepest"]]]] + ]; \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/13.Add-Key-Value-Pairs-to-JavaScript-Objects_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/13.Add-Key-Value-Pairs-to-JavaScript-Objects_script.js new file mode 100644 index 0000000..24c6068 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/13.Add-Key-Value-Pairs-to-JavaScript-Objects_script.js @@ -0,0 +1,11 @@ +let foods = { + apples: 25, + oranges: 32, + plums: 28 + }; + + foods["bananas"] = 13; + foods["grapes"] = 35; + foods["strawberries"] = 27; + + console.log(foods); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/14.Modify-an-Object-Nested-Within-an-Object_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/14.Modify-an-Object-Nested-Within-an-Object_script.js new file mode 100644 index 0000000..fb5bfb2 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/14.Modify-an-Object-Nested-Within-an-Object_script.js @@ -0,0 +1,12 @@ +let userActivity = { + id: 23894201352, + date: "January 1, 2017", + data: { + totalUsers: 51, + online: 42 + } + }; + + userActivity.data.online = 45; + + console.log(userActivity); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/15.Access-Property-Names-with-Bracket-Notation_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/15.Access-Property-Names-with-Bracket-Notation_script.js new file mode 100644 index 0000000..e590f5c --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/15.Access-Property-Names-with-Bracket-Notation_script.js @@ -0,0 +1,14 @@ +let foods = { + apples: 25, + oranges: 32, + plums: 28, + bananas: 13, + grapes: 35, + strawberries: 27 + }; + + function checkInventory(scannedItem) { + return foods[scannedItem]; + } + + console.log(checkInventory("apples")); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/16.Use-the-delete-Keyword-to-Remove-Object-Properties_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/16.Use-the-delete-Keyword-to-Remove-Object-Properties_script.js new file mode 100644 index 0000000..565b711 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/16.Use-the-delete-Keyword-to-Remove-Object-Properties_script.js @@ -0,0 +1,14 @@ +let foods = { + apples: 25, + oranges: 32, + plums: 28, + bananas: 13, + grapes: 35, + strawberries: 27 + }; + + delete foods.oranges; + delete foods.plums; + delete foods.strawberries; + + console.log(foods); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/17.Check-if-an-Object-has-a-Property_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/17.Check-if-an-Object-has-a-Property_script.js new file mode 100644 index 0000000..bb04ac1 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/17.Check-if-an-Object-has-a-Property_script.js @@ -0,0 +1,30 @@ +let users = { + Alan: { + age: 27, + online: true + }, + Jeff: { + age: 32, + online: true + }, + Sarah: { + age: 48, + online: true + }, + Ryan: { + age: 19, + online: true + } + }; + + function isEveryoneHere(userObj) { + if ( + userObj.hasOwnProperty("Alan") && + userObj.hasOwnProperty("Jeff") && + userObj.hasOwnProperty("Sarah") && + userObj.hasOwnProperty("Ryan") + ) { + return true; + } + return false; + } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/18.Iterate-Through-the-Keys-of-an Object-with-a-for-in-Statement_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/18.Iterate-Through-the-Keys-of-an Object-with-a-for-in-Statement_script.js new file mode 100644 index 0000000..6a80f1d --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/18.Iterate-Through-the-Keys-of-an Object-with-a-for-in-Statement_script.js @@ -0,0 +1,9 @@ +function countOnline(usersObj) { + let result = 0; + for (let user in usersObj) { + if (usersObj[user].online === true) { + result++; + } + } + return result; + } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/19.Generate-an-Array-of-All-Object-Keys-with-Object.keys()_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/19.Generate-an-Array-of-All-Object-Keys-with-Object.keys()_script.js new file mode 100644 index 0000000..9706a4d --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/19.Generate-an-Array-of-All-Object-Keys-with-Object.keys()_script.js @@ -0,0 +1,24 @@ +let users = { + Alan: { + age: 27, + online: false + }, + Jeff: { + age: 32, + online: true + }, + Sarah: { + age: 48, + online: false + }, + Ryan: { + age: 19, + online: true + } + }; + + function getArrayOfUsers(obj) { + return Object.keys(obj); + } + + console.log(getArrayOfUsers(users)); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/20.Modify-an-Array-Stored-in-an-Object_script.js b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/20.Modify-an-Array-Stored-in-an-Object_script.js new file mode 100644 index 0000000..ba7707f --- /dev/null +++ b/JavaScript Algorithms and Data Structures/05-Basic-Data-Structures/20.Modify-an-Array-Stored-in-an-Object_script.js @@ -0,0 +1,22 @@ +let user = { + name: "Kenneth", + age: 28, + data: { + username: "kennethCodesAllDay", + joinDate: "March 26, 2016", + organization: "freeCodeCamp", + friends: ["Sam", "Kira", "Tomo"], + location: { + city: "San Francisco", + state: "CA", + country: "USA" + } + } + }; + + function addFriend(userObj, friend) { +userObj.data.friends.push(friend); + return userObj.data.friends; + } + + console.log(addFriend(user, "Pete")); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/01.Convert-Celsius-to-Fahrenheit_script.js b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/01.Convert-Celsius-to-Fahrenheit_script.js new file mode 100644 index 0000000..33e37af --- /dev/null +++ b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/01.Convert-Celsius-to-Fahrenheit_script.js @@ -0,0 +1,6 @@ +function convertCtoF(celsius) { + let fahrenheit = celsius * 9 / 5 + 32; + return fahrenheit; + } + + convertCtoF(30); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/02.Reverse-a-String_script.js b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/02.Reverse-a-String_script.js new file mode 100644 index 0000000..9e91553 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/02.Reverse-a-String_script.js @@ -0,0 +1,9 @@ +function reverseString(str) { + let reversedStr = ""; + for (let i = str.length - 1; i >= 0; i--) { + reversedStr += str[i]; + } + return reversedStr; + } + + reverseString("hello"); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/03.Factorialize-a-Number_script.js b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/03.Factorialize-a-Number_script.js new file mode 100644 index 0000000..0f420e5 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/03.Factorialize-a-Number_script.js @@ -0,0 +1,12 @@ +function factorialize(num) { + let result = 1; + for (let i = 1; i <= num; i++) { + const element = i; + result *= element; + console.log(num); + } + + return result; +} + + factorialize(5); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/04.Find-the-Longest-Word-in-a-String_script.js b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/04.Find-the-Longest-Word-in-a-String_script.js new file mode 100644 index 0000000..5e8c6db --- /dev/null +++ b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/04.Find-the-Longest-Word-in-a-String_script.js @@ -0,0 +1,15 @@ +function findLongestWordLength(str) { + let maxLength = -1; + let words = str.split(' '); + + for (let i = 0; i < words.length; i++) { + const elementLength = words[i].length; + if (elementLength > maxLength) { + maxLength = elementLength; + } + } + + return maxLength; + } + + findLongestWordLength("The quick brown fox jumped over the lazy dog"); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/05.Return-Largest-Numbers-in-Arrays_script.js b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/05.Return-Largest-Numbers-in-Arrays_script.js new file mode 100644 index 0000000..e52119c --- /dev/null +++ b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/05.Return-Largest-Numbers-in-Arrays_script.js @@ -0,0 +1,16 @@ +function largestOfFour(arr) { + const results = []; + for (let i = 0; i < arr.length; i++) { + let largestNumber = arr[i][0]; + for (let j = 1; j < arr[i].length; j++) { + if (arr[i][j] > largestNumber) { + largestNumber = arr[i][j]; + } + } + results[i] = largestNumber; + } + + return results; + } + + largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/06.Confirm-the-Ending_script.js b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/06.Confirm-the-Ending_script.js new file mode 100644 index 0000000..d3c5bde --- /dev/null +++ b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/06.Confirm-the-Ending_script.js @@ -0,0 +1,7 @@ +function confirmEnding(str, target) { + + return str.slice(str.length - target.length) === target; + + } + + confirmEnding("Bastian", "n"); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/07.Repeat-a-String-Repeat-a-String_script.js b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/07.Repeat-a-String-Repeat-a-String_script.js new file mode 100644 index 0000000..5fd8d14 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/07.Repeat-a-String-Repeat-a-String_script.js @@ -0,0 +1,9 @@ +function repeatStringNumTimes(str, num) { + let repeatedStr = ""; + for (let i = 0; i < num; i++) { + repeatedStr += str; + } + return repeatedStr; + } + + repeatStringNumTimes("abc", 3); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/08.Truncate-a-String_script.js b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/08.Truncate-a-String_script.js new file mode 100644 index 0000000..8a8699a --- /dev/null +++ b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/08.Truncate-a-String_script.js @@ -0,0 +1,5 @@ +function truncateString(str, num) { + return str.length <= num ? str.slice(0, num) : str.slice(0, num) + "..."; + } + + truncateString("A-tisket a-tasket A green and yellow basket", 8); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/09.Finders-Keepers_script.js b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/09.Finders-Keepers_script.js new file mode 100644 index 0000000..318b3e5 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/09.Finders-Keepers_script.js @@ -0,0 +1,12 @@ +function findElement(arr, func) { + let num = 0; + + for (let i = 0; i < arr.length; i++) { + num = arr[i]; + if (func(num)) { + return num; + } + } + + return undefined; + } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/10.Boo-who_script.js b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/10.Boo-who_script.js new file mode 100644 index 0000000..2c06348 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/10.Boo-who_script.js @@ -0,0 +1,5 @@ +function booWho(bool) { + return bool === true || bool === false ? true : false; + } + + booWho(null); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/11.Title-Case-a-Sentence_script.js b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/11.Title-Case-a-Sentence_script.js new file mode 100644 index 0000000..dbe9c02 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/11.Title-Case-a-Sentence_script.js @@ -0,0 +1,8 @@ +function titleCase(str) { + const newTitle = str.split(" "); + const updatedTitle = []; + for (let st in newTitle) { + updatedTitle[st] = newTitle[st][0].toUpperCase() + newTitle[st].slice(1).toLowerCase(); + } + return updatedTitle.join(" "); + } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/12.Slice-and-Splice_script.js b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/12.Slice-and-Splice_script.js new file mode 100644 index 0000000..4ac59f6 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/12.Slice-and-Splice_script.js @@ -0,0 +1,8 @@ +function frankenSplice(arr1, arr2, n) { + let localArray = arr2.slice(); + for (let i = 0; i < arr1.length; i++) { + localArray.splice(n, 0, arr1[i]); + n++; + } + return localArray; + } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/13.Falsy-Bouncer_script.js b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/13.Falsy-Bouncer_script.js new file mode 100644 index 0000000..1c65511 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/13.Falsy-Bouncer_script.js @@ -0,0 +1,7 @@ +function bouncer(arr) { + let newArray = []; + for (let i = 0; i < arr.length; i++) { + if (arr[i]) newArray.push(arr[i]); + } + return newArray; + } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/14.Where-do-I-Belong_script.js b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/14.Where-do-I-Belong_script.js new file mode 100644 index 0000000..825c6e2 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/14.Where-do-I-Belong_script.js @@ -0,0 +1,10 @@ +function getIndexToIns(arr, num) { + arr.sort((a, b) => a - b); + + for (let i = 0; i < arr.length; i++) { + if (arr[i] >= num) + return i; + } + + return arr.length; + } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/15.Mutations_script.js b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/15.Mutations_script.js new file mode 100644 index 0000000..753f5f6 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/15.Mutations_script.js @@ -0,0 +1,8 @@ +function mutation(arr) { + let test = arr[1].toLowerCase(); + let target = arr[0].toLowerCase(); + for (let i = 0; i < test.length; i++) { + if (target.indexOf(test[i]) < 0) return false; + } + return true; + } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/16.Chunky-Monkey_script.js b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/16.Chunky-Monkey_script.js new file mode 100644 index 0000000..88eb6fb --- /dev/null +++ b/JavaScript Algorithms and Data Structures/06-Basic-Algorithm-Scripting/16.Chunky-Monkey_script.js @@ -0,0 +1,16 @@ +function chunkArrayInGroups(arr, size) { + let temp = []; + let result = []; + + for (let a = 0; a < arr.length; a++) { + if (a % size !== size - 1) temp.push(arr[a]); + else { + temp.push(arr[a]); + result.push(temp); + temp = []; + } + } + + if (temp.length !== 0) result.push(temp); + return result; + } \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/01.Create-a-Basic-JavaScript-Object_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/01.Create-a-Basic-JavaScript-Object_script.js new file mode 100644 index 0000000..0952f26 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/01.Create-a-Basic-JavaScript-Object_script.js @@ -0,0 +1,4 @@ +let dog = { + name: 'Aflac', + numLegs: 2, +}; diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/02.Use-Dot-Notation-to-Access-the-Properties-of-an-Object_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/02.Use-Dot-Notation-to-Access-the-Properties-of-an-Object_script.js new file mode 100644 index 0000000..de53ddc --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/02.Use-Dot-Notation-to-Access-the-Properties-of-an-Object_script.js @@ -0,0 +1,6 @@ +let dog = { + name: 'Spot', + numLegs: 4, +}; +console.log(dog.name); +console.log(dog.numLegs); diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/03.Create-a-Method-on-an-Object_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/03.Create-a-Method-on-an-Object_script.js new file mode 100644 index 0000000..c5a6ada --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/03.Create-a-Method-on-an-Object_script.js @@ -0,0 +1,9 @@ +let dog = { + name: 'Spot', + numLegs: 4, + sayLegs: function () { + return 'This dog has ' + dog.numLegs + ' legs.'; + }, +}; + +dog.sayLegs(); diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/04.Make-Code-More-Reusable-with-the-this-Keyword_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/04.Make-Code-More-Reusable-with-the-this-Keyword_script.js new file mode 100644 index 0000000..0dbeb29 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/04.Make-Code-More-Reusable-with-the-this-Keyword_script.js @@ -0,0 +1,9 @@ +let dog = { + name: 'Spot', + numLegs: 4, + sayLegs: function () { + return 'This dog has ' + this.numLegs + ' legs.'; + }, +}; + +dog.sayLegs(); diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/05.Define-a-Constructor-Function_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/05.Define-a-Constructor-Function_script.js new file mode 100644 index 0000000..3781fe4 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/05.Define-a-Constructor-Function_script.js @@ -0,0 +1,5 @@ +function Dog() { + this.name = 'Rex'; + this.color = 'Golden'; + this.numLegs = 4; +} diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/06.Use-a-Constructor-to-Create-Objects_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/06.Use-a-Constructor-to-Create-Objects_script.js new file mode 100644 index 0000000..7600998 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/06.Use-a-Constructor-to-Create-Objects_script.js @@ -0,0 +1,7 @@ +function Dog() { + this.name = 'Rupert'; + this.color = 'brown'; + this.numLegs = 4; +} + +let hound = new Dog(); diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/07.Extend-Constructors-to-Receive-Arguments_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/07.Extend-Constructors-to-Receive-Arguments_script.js new file mode 100644 index 0000000..272be09 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/07.Extend-Constructors-to-Receive-Arguments_script.js @@ -0,0 +1,6 @@ +function Dog(name, color) { + this.name = name; + this.color = color; + this.numLegs = 4; +} +let terrier = new Dog('Rex', 'black'); diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/08.Verify-an-Object's-Constructor-with-instanceof_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/08.Verify-an-Object's-Constructor-with-instanceof_script.js new file mode 100644 index 0000000..bb2a479 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/08.Verify-an-Object's-Constructor-with-instanceof_script.js @@ -0,0 +1,7 @@ +function House(numBedrooms) { + this.numBedrooms = numBedrooms; +} + +let myHouse = new House(2); + +myHouse instanceof House; diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/09.Understand-Own-Properties_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/09.Understand-Own-Properties_script.js new file mode 100644 index 0000000..10f388b --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/09.Understand-Own-Properties_script.js @@ -0,0 +1,13 @@ +function Bird(name) { + this.name = name; + this.numLegs = 2; +} + +let canary = new Bird('Tweety'); +let ownProps = []; + +for (let property in canary) { + if (canary.hasOwnProperty(property)) { + ownProps.push(property); + } +} diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/10.Use-Prototype-Properties-to-Reduce-Duplicate-Code_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/10.Use-Prototype-Properties-to-Reduce-Duplicate-Code_script.js new file mode 100644 index 0000000..bf3c17b --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/10.Use-Prototype-Properties-to-Reduce-Duplicate-Code_script.js @@ -0,0 +1,6 @@ +function Dog(name) { + this.name = name; +} + +let beagle = new Dog('Snoopy'); +Dog.prototype.numLegs = 2; diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/11.Iterate-Over-All-Properties_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/11.Iterate-Over-All-Properties_script.js new file mode 100644 index 0000000..c22133f --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/11.Iterate-Over-All-Properties_script.js @@ -0,0 +1,19 @@ +function Dog(name) { + this.name = name; +} + +Dog.prototype.numLegs = 4; + +let beagle = new Dog('Snoopy'); + +let ownProps = []; +let prototypeProps = []; + +for (let property in beagle) { + if(beagle.hasOwnProperty(property)) { + ownProps.push(property); + } else { + prototypeProps.push(property); + } + } + \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/12.Understand-the-Constructor-Property_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/12.Understand-the-Constructor-Property_script.js new file mode 100644 index 0000000..e82f808 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/12.Understand-the-Constructor-Property_script.js @@ -0,0 +1,7 @@ +function Dog(name) { + this.name = name; +} + +function joinDogFraternity(candidate) { + return candidate.constructor === Dog; +} diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/13.Change-the-Prototype-to-a-New-Object_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/13.Change-the-Prototype-to-a-New-Object_script.js new file mode 100644 index 0000000..dc6169c --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/13.Change-the-Prototype-to-a-New-Object_script.js @@ -0,0 +1,13 @@ +function Dog(name) { + this.name = name; +} + +Dog.prototype = { + numLegs: 4, + eat: function () { + console.log('nom nom nom'); + }, + describe: function () { + console.log('My name is ' + this.name); + }, +}; diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/14.Remember-to-Set-the-Constructor-Property-when-Changing-the-Prototype_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/14.Remember-to-Set-the-Constructor-Property-when-Changing-the-Prototype_script.js new file mode 100644 index 0000000..42c86b9 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/14.Remember-to-Set-the-Constructor-Property-when-Changing-the-Prototype_script.js @@ -0,0 +1,14 @@ +function Dog(name) { + this.name = name; +} + +Dog.prototype = { + constructor: Dog, + numLegs: 2, + eat: function () { + console.log('nom nom nom'); + }, + describe: function () { + console.log('My name is ' + this.name); + }, +}; diff --git "a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/15.Understand-Where-an-Object\342\200\231s-Prototype-Comes-From_script.js" "b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/15.Understand-Where-an-Object\342\200\231s-Prototype-Comes-From_script.js" new file mode 100644 index 0000000..d0b8dae --- /dev/null +++ "b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/15.Understand-Where-an-Object\342\200\231s-Prototype-Comes-From_script.js" @@ -0,0 +1,7 @@ +function Dog(name) { + this.name = name; +} + +let beagle = new Dog('Snoopy'); + +console.log(Dog.prototype.isPrototypeOf(beagle)); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/16.Understand-the-Prototype-Chain_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/16.Understand-the-Prototype-Chain_script.js new file mode 100644 index 0000000..1b30652 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/16.Understand-the-Prototype-Chain_script.js @@ -0,0 +1,8 @@ +function Dog(name) { + this.name = name; +} + +let beagle = new Dog('Snoopy'); + +Dog.prototype.isPrototypeOf(beagle); +Object.prototype.isPrototypeOf(Dog.prototype); diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/17.Use-Inheritance-So-You-Don't-Repeat-Yourself_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/17.Use-Inheritance-So-You-Don't-Repeat-Yourself_script.js new file mode 100644 index 0000000..38fc76a --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/17.Use-Inheritance-So-You-Don't-Repeat-Yourself_script.js @@ -0,0 +1,24 @@ +function Cat(name) { + this.name = name; +} + +Cat.prototype = { + constructor: Cat, +}; + +function Bear(name) { + this.name = name; +} + +Bear.prototype = { + constructor: Bear, +}; + +function Animal() {} + +Animal.prototype = { + constructor: Animal, + eat: function () { + console.log('nom nom nom'); + }, +}; diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/18.Inherit-Behaviors-from-a-Supertype_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/18.Inherit-Behaviors-from-a-Supertype_script.js new file mode 100644 index 0000000..a8a2756 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/18.Inherit-Behaviors-from-a-Supertype_script.js @@ -0,0 +1,11 @@ +function Animal() {} + +Animal.prototype = { + constructor: Animal, + eat: function () { + console.log('nom nom nom'); + }, +}; + +let duck = Object.create(Animal.prototype);; +let beagle = Object.create(Animal.prototype);; diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/19.Set-the-Child's-Prototype-to-an-Instance-of-the-Parent_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/19.Set-the-Child's-Prototype-to-an-Instance-of-the-Parent_script.js new file mode 100644 index 0000000..19f76b3 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/19.Set-the-Child's-Prototype-to-an-Instance-of-the-Parent_script.js @@ -0,0 +1,13 @@ +function Animal() {} + +Animal.prototype = { + constructor: Animal, + eat: function () { + console.log('nom nom nom'); + }, +}; + +function Dog() {} + +let beagle = new Dog(); +Dog.prototype = Object.create(Animal.prototype); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/20.Reset-an-Inherited-Constructor-Property_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/20.Reset-an-Inherited-Constructor-Property_script.js new file mode 100644 index 0000000..4f81ffd --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/20.Reset-an-Inherited-Constructor-Property_script.js @@ -0,0 +1,12 @@ +function Animal() {} +function Bird() {} +function Dog() {} + +Bird.prototype = Object.create(Animal.prototype); +Dog.prototype = Object.create(Animal.prototype); + +Bird.prototype.constructor = Bird; +Dog.prototype.constructor = Dog; + +let duck = new Bird(); +let beagle = new Dog(); diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/21.Add-Methods-After-Inheritance_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/21.Add-Methods-After-Inheritance_script.js new file mode 100644 index 0000000..bff8c9a --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/21.Add-Methods-After-Inheritance_script.js @@ -0,0 +1,14 @@ +function Animal() {} +Animal.prototype.eat = function () { + console.log('nom nom nom'); +}; + +function Dog() {} + +Dog.prototype = Object.create(Animal.prototype); +Dog.prototype.constructor = Dog; +Dog.prototype.bark = function () { + console.log('Woof!'); +}; + +let beagle = new Dog(); diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/22.Override-Inherited-Methods_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/22.Override-Inherited-Methods_script.js new file mode 100644 index 0000000..aadea8d --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/22.Override-Inherited-Methods_script.js @@ -0,0 +1,16 @@ +function Bird() {} + +Bird.prototype.fly = function () { + return 'I am flying!'; +}; + +function Penguin() {} +Penguin.prototype = Object.create(Bird.prototype); +Penguin.prototype.constructor = Penguin; + +Penguin.prototype.fly = function () { + return 'Alas, this is a flightless bird.'; +}; + +let penguin = new Penguin(); +console.log(penguin.fly()); diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/23.Use-a-Mixin-to-Add-Common-Behavior-Between-Unrelated-Objects_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/23.Use-a-Mixin-to-Add-Common-Behavior-Between-Unrelated-Objects_script.js new file mode 100644 index 0000000..8cb19c0 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/23.Use-a-Mixin-to-Add-Common-Behavior-Between-Unrelated-Objects_script.js @@ -0,0 +1,17 @@ +let bird = { + name: 'Donald', + numLegs: 2, +}; + +let boat = { + name: 'Warrior', + type: 'race-boat', +}; + +let glideMixin = function (obj) { + obj.glide = function () { + console.log('Gliding!'); + }; +}; +glideMixin(bird); +glideMixin(boat); diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/24.Use-Closure-to-Protect-Properties-Within-an-Object-from-Being-Modified-Externally_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/24.Use-Closure-to-Protect-Properties-Within-an-Object-from-Being-Modified-Externally_script.js new file mode 100644 index 0000000..92c19c9 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/24.Use-Closure-to-Protect-Properties-Within-an-Object-from-Being-Modified-Externally_script.js @@ -0,0 +1,7 @@ +function Bird() { + let weight = 15; + + this.getWeight = function () { + return weight; + }; +} diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/25.Understand-the-Immediately-Invoked-Function-Expression-(IIFE)_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/25.Understand-the-Immediately-Invoked-Function-Expression-(IIFE)_script.js new file mode 100644 index 0000000..7e48d4f --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/25.Understand-the-Immediately-Invoked-Function-Expression-(IIFE)_script.js @@ -0,0 +1,4 @@ +(function () { + console.log('A cozy nest is ready'); +})(); +makeNest(); diff --git a/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/26.Use-an-IIFE-to-Create-a-Module_script.js b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/26.Use-an-IIFE-to-Create-a-Module_script.js new file mode 100644 index 0000000..273eb8a --- /dev/null +++ b/JavaScript Algorithms and Data Structures/07-Object-Oriented-Programming/26.Use-an-IIFE-to-Create-a-Module_script.js @@ -0,0 +1,14 @@ +let funModule = (function () { + return { + isCuteMixin: function (obj) { + obj.isCute = function () { + return true; + }; + }, + singMixin: function (obj) { + obj.sing = function () { + console.log('Singing to an awesome tune'); + }; + }, + }; +})(); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/01.Learn-About-Functional-Programming.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/01.Learn-About-Functional-Programming.js new file mode 100644 index 0000000..a1c8364 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/01.Learn-About-Functional-Programming.js @@ -0,0 +1,13 @@ +const prepareTea = () => 'greenTea'; + +const getTea = (numOfCups) => { + const teaCups = []; + + for (let cups = 1; cups <= numOfCups; cups += 1) { + const teaCup = prepareTea(); + teaCups.push(teaCup); + } + return teaCups; +}; + +const tea4TeamFCC = getTea(40); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/02.Understand-Functional-Programming-Terminology.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/02.Understand-Functional-Programming-Terminology.js new file mode 100644 index 0000000..4b21f54 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/02.Understand-Functional-Programming-Terminology.js @@ -0,0 +1,18 @@ +const prepareGreenTea = () => 'greenTea'; + +const prepareBlackTea = () => 'blackTea'; + +const getTea = (prepareTea, numOfCups) => { + const teaCups = []; + + for (let cups = 1; cups <= numOfCups; cups += 1) { + const teaCup = prepareTea(); + teaCups.push(teaCup); + } + return teaCups; +}; + +const tea4GreenTeamFCC = getTea(prepareGreenTea, 27); +const tea4BlackTeamFCC = getTea(prepareBlackTea, 13); + +console.log(tea4GreenTeamFCC, tea4BlackTeamFCC); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/03.Understand-the-Hazards-of-Using-Imperative-Code.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/03.Understand-the-Hazards-of-Using-Imperative-Code.js new file mode 100644 index 0000000..9d8ceb5 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/03.Understand-the-Hazards-of-Using-Imperative-Code.js @@ -0,0 +1,44 @@ +const Window = function (tabs) { + this.tabs = tabs; +}; + +Window.prototype.join = function (otherWindow) { + this.tabs = this.tabs.concat(otherWindow.tabs); + return this; +}; + +Window.prototype.tabOpen = function (tab) { + this.tabs.push('new tab'); + return this; +}; + +Window.prototype.tabClose = function (index) { + const tabsBeforeIndex = this.tabs.slice(0, index); + const tabsAfterIndex = this.tabs.slice(index + 1); + + this.tabs = tabsBeforeIndex.concat(tabsAfterIndex); + + return this; +}; + +const workWindow = new Window([ + 'GMail', + 'Inbox', + 'Work mail', + 'Docs', + 'freeCodeCamp', +]); +const socialWindow = new Window([ + 'FB', + 'Gitter', + 'Reddit', + 'Twitter', + 'Medium', +]); +const videoWindow = new Window(['Netflix', 'YouTube', 'Vimeo', 'Vine']); + +const finalTabs = socialWindow + .tabOpen() + .join(videoWindow.tabClose(2)) + .join(workWindow.tabClose(1).tabOpen()); +console.log(finalTabs.tabs); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/04.Avoid-Mutations-and-Side-Effects-Using-Functional-Programming.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/04.Avoid-Mutations-and-Side-Effects-Using-Functional-Programming.js new file mode 100644 index 0000000..a36e630 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/04.Avoid-Mutations-and-Side-Effects-Using-Functional-Programming.js @@ -0,0 +1,5 @@ +let fixedValue = 4; + +function incrementer() { + return (fixedValue + 1); +} diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/05.Pass-Arguments-to-Avoid-External-Dependence-in-a-Function.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/05.Pass-Arguments-to-Avoid-External-Dependence-in-a-Function.js new file mode 100644 index 0000000..23ce785 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/05.Pass-Arguments-to-Avoid-External-Dependence-in-a-Function.js @@ -0,0 +1,5 @@ +let fixedValue = 4; + +function incrementer(arg) { + return arg += 1;p +} diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/06.Refactor-Global-Variables-Out-of-Functions.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/06.Refactor-Global-Variables-Out-of-Functions.js new file mode 100644 index 0000000..f1391e9 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/06.Refactor-Global-Variables-Out-of-Functions.js @@ -0,0 +1,22 @@ +var bookList = [ + 'The Hound of the Baskervilles', + 'On The Electrodynamics of Moving Bodies', + 'PhilosophiƦ Naturalis Principia Mathematica', + 'Disquisitiones Arithmeticae', +]; + +function add(array, bookName) { + let sliced = array.slice(0); + sliced.push(bookName); + return sliced; +} + +function remove(array, bookName) { + let slicedTwo = array.slice(0); + if (slicedTwo.indexOf(bookName) >= 0) { + let index = slicedTwo.indexOf(bookName); + + slicedTwo.splice(index, 1); + return slicedTwo; + } +} \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/07.Use-the-map-Method-to-Extract-Data-from-an-Array.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/07.Use-the-map-Method-to-Extract-Data-from-an-Array.js new file mode 100644 index 0000000..c622667 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/07.Use-the-map-Method-to-Extract-Data-from-an-Array.js @@ -0,0 +1,126 @@ +const watchList = [ + { + Title: 'Inception', + Year: '2010', + Rated: 'PG-13', + Released: '16 Jul 2010', + Runtime: '148 min', + Genre: 'Action, Adventure, Crime', + Director: 'Christopher Nolan', + Writer: 'Christopher Nolan', + Actors: 'Leonardo DiCaprio, Joseph Gordon-Levitt, Elliot Page, Tom Hardy', + Plot: 'A thief, who steals corporate secrets through use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a CEO.', + Language: 'English, Japanese, French', + Country: 'USA, UK', + Awards: 'Won 4 Oscars. Another 143 wins & 198 nominations.', + Poster: + 'http://ia.media-imdb.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg', + Metascore: '74', + imdbRating: '8.8', + imdbVotes: '1,446,708', + imdbID: 'tt1375666', + Type: 'movie', + Response: 'True', + }, + { + Title: 'Interstellar', + Year: '2014', + Rated: 'PG-13', + Released: '07 Nov 2014', + Runtime: '169 min', + Genre: 'Adventure, Drama, Sci-Fi', + Director: 'Christopher Nolan', + Writer: 'Jonathan Nolan, Christopher Nolan', + Actors: 'Ellen Burstyn, Matthew McConaughey, Mackenzie Foy, John Lithgow', + Plot: "A team of explorers travel through a wormhole in space in an attempt to ensure humanity's survival.", + Language: 'English', + Country: 'USA, UK', + Awards: 'Won 1 Oscar. Another 39 wins & 132 nominations.', + Poster: + 'http://ia.media-imdb.com/images/M/MV5BMjIxNTU4MzY4MF5BMl5BanBnXkFtZTgwMzM4ODI3MjE@._V1_SX300.jpg', + Metascore: '74', + imdbRating: '8.6', + imdbVotes: '910,366', + imdbID: 'tt0816692', + Type: 'movie', + Response: 'True', + }, + { + Title: 'The Dark Knight', + Year: '2008', + Rated: 'PG-13', + Released: '18 Jul 2008', + Runtime: '152 min', + Genre: 'Action, Adventure, Crime', + Director: 'Christopher Nolan', + Writer: + 'Jonathan Nolan (screenplay), Christopher Nolan (screenplay), Christopher Nolan (story), David S. Goyer (story), Bob Kane (characters)', + Actors: 'Christian Bale, Heath Ledger, Aaron Eckhart, Michael Caine', + Plot: 'When the menace known as the Joker wreaks havoc and chaos on the people of Gotham, the caped crusader must come to terms with one of the greatest psychological tests of his ability to fight injustice.', + Language: 'English, Mandarin', + Country: 'USA, UK', + Awards: 'Won 2 Oscars. Another 146 wins & 142 nominations.', + Poster: + 'http://ia.media-imdb.com/images/M/MV5BMTMxNTMwODM0NF5BMl5BanBnXkFtZTcwODAyMTk2Mw@@._V1_SX300.jpg', + Metascore: '82', + imdbRating: '9.0', + imdbVotes: '1,652,832', + imdbID: 'tt0468569', + Type: 'movie', + Response: 'True', + }, + { + Title: 'Batman Begins', + Year: '2005', + Rated: 'PG-13', + Released: '15 Jun 2005', + Runtime: '140 min', + Genre: 'Action, Adventure', + Director: 'Christopher Nolan', + Writer: + 'Bob Kane (characters), David S. Goyer (story), Christopher Nolan (screenplay), David S. Goyer (screenplay)', + Actors: 'Christian Bale, Michael Caine, Liam Neeson, Katie Holmes', + Plot: 'After training with his mentor, Batman begins his fight to free crime-ridden Gotham City from the corruption that Scarecrow and the League of Shadows have cast upon it.', + Language: 'English, Urdu, Mandarin', + Country: 'USA, UK', + Awards: 'Nominated for 1 Oscar. Another 15 wins & 66 nominations.', + Poster: + 'http://ia.media-imdb.com/images/M/MV5BNTM3OTc0MzM2OV5BMl5BanBnXkFtZTYwNzUwMTI3._V1_SX300.jpg', + Metascore: '70', + imdbRating: '8.3', + imdbVotes: '972,584', + imdbID: 'tt0372784', + Type: 'movie', + Response: 'True', + }, + { + Title: 'Avatar', + Year: '2009', + Rated: 'PG-13', + Released: '18 Dec 2009', + Runtime: '162 min', + Genre: 'Action, Adventure, Fantasy', + Director: 'James Cameron', + Writer: 'James Cameron', + Actors: 'Sam Worthington, Zoe Saldana, Sigourney Weaver, Stephen Lang', + Plot: 'A paraplegic marine dispatched to the moon Pandora on a unique mission becomes torn between following his orders and protecting the world he feels is his home.', + Language: 'English, Spanish', + Country: 'USA, UK', + Awards: 'Won 3 Oscars. Another 80 wins & 121 nominations.', + Poster: + 'http://ia.media-imdb.com/images/M/MV5BMTYwOTEwNjAzMl5BMl5BanBnXkFtZTcwODc5MTUwMw@@._V1_SX300.jpg', + Metascore: '83', + imdbRating: '7.9', + imdbVotes: '876,575', + imdbID: 'tt0499549', + Type: 'movie', + Response: 'True', + }, +]; + +const ratings = watchList.map(({ Title: title, imdbRating: rating }) => ({ + title, + rating, +})); + +console.log(JSON.stringify(ratings)); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/08.Implement-map-on-a-Prototype.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/08.Implement-map-on-a-Prototype.js new file mode 100644 index 0000000..77adc77 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/08.Implement-map-on-a-Prototype.js @@ -0,0 +1,14 @@ + +const s = [23, 65, 98, 5]; + +Array.prototype.myMap = function (callback) { + const newArray = []; + for (let i = 0; i < this.length; i++) { + newArray.push(callback(this[i])); + } + return newArray; +}; + +const new_s = s.myMap(function (item) { + return item * 2; +}); \ No newline at end of file diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/09.Use-the-filter-Method-to-Extract-Data-from-an-Array.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/09.Use-the-filter-Method-to-Extract-Data-from-an-Array.js new file mode 100644 index 0000000..37e37e9 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/09.Use-the-filter-Method-to-Extract-Data-from-an-Array.js @@ -0,0 +1,126 @@ +const watchList = [ + { + Title: 'Inception', + Year: '2010', + Rated: 'PG-13', + Released: '16 Jul 2010', + Runtime: '148 min', + Genre: 'Action, Adventure, Crime', + Director: 'Christopher Nolan', + Writer: 'Christopher Nolan', + Actors: 'Leonardo DiCaprio, Joseph Gordon-Levitt, Elliot Page, Tom Hardy', + Plot: 'A thief, who steals corporate secrets through use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a CEO.', + Language: 'English, Japanese, French', + Country: 'USA, UK', + Awards: 'Won 4 Oscars. Another 143 wins & 198 nominations.', + Poster: + 'http://ia.media-imdb.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg', + Metascore: '74', + imdbRating: '8.8', + imdbVotes: '1,446,708', + imdbID: 'tt1375666', + Type: 'movie', + Response: 'True', + }, + { + Title: 'Interstellar', + Year: '2014', + Rated: 'PG-13', + Released: '07 Nov 2014', + Runtime: '169 min', + Genre: 'Adventure, Drama, Sci-Fi', + Director: 'Christopher Nolan', + Writer: 'Jonathan Nolan, Christopher Nolan', + Actors: 'Ellen Burstyn, Matthew McConaughey, Mackenzie Foy, John Lithgow', + Plot: "A team of explorers travel through a wormhole in space in an attempt to ensure humanity's survival.", + Language: 'English', + Country: 'USA, UK', + Awards: 'Won 1 Oscar. Another 39 wins & 132 nominations.', + Poster: + 'http://ia.media-imdb.com/images/M/MV5BMjIxNTU4MzY4MF5BMl5BanBnXkFtZTgwMzM4ODI3MjE@._V1_SX300.jpg', + Metascore: '74', + imdbRating: '8.6', + imdbVotes: '910,366', + imdbID: 'tt0816692', + Type: 'movie', + Response: 'True', + }, + { + Title: 'The Dark Knight', + Year: '2008', + Rated: 'PG-13', + Released: '18 Jul 2008', + Runtime: '152 min', + Genre: 'Action, Adventure, Crime', + Director: 'Christopher Nolan', + Writer: + 'Jonathan Nolan (screenplay), Christopher Nolan (screenplay), Christopher Nolan (story), David S. Goyer (story), Bob Kane (characters)', + Actors: 'Christian Bale, Heath Ledger, Aaron Eckhart, Michael Caine', + Plot: 'When the menace known as the Joker wreaks havoc and chaos on the people of Gotham, the caped crusader must come to terms with one of the greatest psychological tests of his ability to fight injustice.', + Language: 'English, Mandarin', + Country: 'USA, UK', + Awards: 'Won 2 Oscars. Another 146 wins & 142 nominations.', + Poster: + 'http://ia.media-imdb.com/images/M/MV5BMTMxNTMwODM0NF5BMl5BanBnXkFtZTcwODAyMTk2Mw@@._V1_SX300.jpg', + Metascore: '82', + imdbRating: '9.0', + imdbVotes: '1,652,832', + imdbID: 'tt0468569', + Type: 'movie', + Response: 'True', + }, + { + Title: 'Batman Begins', + Year: '2005', + Rated: 'PG-13', + Released: '15 Jun 2005', + Runtime: '140 min', + Genre: 'Action, Adventure', + Director: 'Christopher Nolan', + Writer: + 'Bob Kane (characters), David S. Goyer (story), Christopher Nolan (screenplay), David S. Goyer (screenplay)', + Actors: 'Christian Bale, Michael Caine, Liam Neeson, Katie Holmes', + Plot: 'After training with his mentor, Batman begins his fight to free crime-ridden Gotham City from the corruption that Scarecrow and the League of Shadows have cast upon it.', + Language: 'English, Urdu, Mandarin', + Country: 'USA, UK', + Awards: 'Nominated for 1 Oscar. Another 15 wins & 66 nominations.', + Poster: + 'http://ia.media-imdb.com/images/M/MV5BNTM3OTc0MzM2OV5BMl5BanBnXkFtZTYwNzUwMTI3._V1_SX300.jpg', + Metascore: '70', + imdbRating: '8.3', + imdbVotes: '972,584', + imdbID: 'tt0372784', + Type: 'movie', + Response: 'True', + }, + { + Title: 'Avatar', + Year: '2009', + Rated: 'PG-13', + Released: '18 Dec 2009', + Runtime: '162 min', + Genre: 'Action, Adventure, Fantasy', + Director: 'James Cameron', + Writer: 'James Cameron', + Actors: 'Sam Worthington, Zoe Saldana, Sigourney Weaver, Stephen Lang', + Plot: 'A paraplegic marine dispatched to the moon Pandora on a unique mission becomes torn between following his orders and protecting the world he feels is his home.', + Language: 'English, Spanish', + Country: 'USA, UK', + Awards: 'Won 3 Oscars. Another 80 wins & 121 nominations.', + Poster: + 'http://ia.media-imdb.com/images/M/MV5BMTYwOTEwNjAzMl5BMl5BanBnXkFtZTcwODc5MTUwMw@@._V1_SX300.jpg', + Metascore: '83', + imdbRating: '7.9', + imdbVotes: '876,575', + imdbID: 'tt0499549', + Type: 'movie', + Response: 'True', + }, +]; + +const filteredList = watchList.map(({ Title: title, imdbRating: rating }) => ({ + title, + rating, +})).filter(m => m.rating >= 8.00); + +console.log(filteredList); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/10.Implement-the-filter-Method-on-a-Prototype.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/10.Implement-the-filter-Method-on-a-Prototype.js new file mode 100644 index 0000000..348806b --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/10.Implement-the-filter-Method-on-a-Prototype.js @@ -0,0 +1,16 @@ +const s = [23, 65, 98, 5]; + +Array.prototype.myFilter = function (callback) { + const newArray = []; + + for (let i = 0; i < this.length; i++) { + if (callback(this[i]) === true) { + newArray.push(this[i]); + } + } + return newArray; +}; + +const new_s = s.myFilter(function (item) { + return item % 2 === 1; +}); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/11.Return-Part-of-an-Array-Using-the-slice-Method.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/11.Return-Part-of-an-Array-Using-the-slice-Method.js new file mode 100644 index 0000000..00ed9f6 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/11.Return-Part-of-an-Array-Using-the-slice-Method.js @@ -0,0 +1,6 @@ +function sliceArray(anim, beginSlice, endSlice) { + return anim.slice(beginSlice, endSlice); +} + +const inputAnim = ['Cat', 'Dog', 'Tiger', 'Zebra', 'Ant']; +sliceArray(inputAnim, 1, 3); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/12.Remove-Elements-from-an-Array-Using-slice-Instead-of-splice.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/12.Remove-Elements-from-an-Array-Using-slice-Instead-of-splice.js new file mode 100644 index 0000000..c3203ea --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/12.Remove-Elements-from-an-Array-Using-slice-Instead-of-splice.js @@ -0,0 +1,6 @@ +function nonMutatingSplice(cities) { + return cities.slice(0, 3); +} + +const inputCities = ['Chicago', 'Delhi', 'Islamabad', 'London', 'Berlin']; +nonMutatingSplice(inputCities); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/13.Combine-Two-Arrays-Using-the-concat-Method.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/13.Combine-Two-Arrays-Using-the-concat-Method.js new file mode 100644 index 0000000..3661471 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/13.Combine-Two-Arrays-Using-the-concat-Method.js @@ -0,0 +1,7 @@ +function nonMutatingConcat(original, attach) { + return original.concat(attach); +} + +const first = [1, 2, 3]; +const second = [4, 5]; +nonMutatingConcat(first, second); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/14.Add-Elements-to-the-End-of-an-Array-Using-concat-Instead-of-push.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/14.Add-Elements-to-the-End-of-an-Array-Using-concat-Instead-of-push.js new file mode 100644 index 0000000..e1cf0f6 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/14.Add-Elements-to-the-End-of-an-Array-Using-concat-Instead-of-push.js @@ -0,0 +1,7 @@ +function nonMutatingPush(original, newItem) { + return original.concat(newItem); +} + +const first = [1, 2, 3]; +const second = [4, 5]; +nonMutatingPush(first, second); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/15.Use-the-reduce-Method-to-Analyze-Data.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/15.Use-the-reduce-Method-to-Analyze-Data.js new file mode 100644 index 0000000..bfba19a --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/15.Use-the-reduce-Method-to-Analyze-Data.js @@ -0,0 +1,131 @@ +const watchList = [ + { + Title: 'Inception', + Year: '2010', + Rated: 'PG-13', + Released: '16 Jul 2010', + Runtime: '148 min', + Genre: 'Action, Adventure, Crime', + Director: 'Christopher Nolan', + Writer: 'Christopher Nolan', + Actors: 'Leonardo DiCaprio, Joseph Gordon-Levitt, Elliot Page, Tom Hardy', + Plot: 'A thief, who steals corporate secrets through use of dream-sharing technology, is given the inverse task of planting an idea into the mind of a CEO.', + Language: 'English, Japanese, French', + Country: 'USA, UK', + Awards: 'Won 4 Oscars. Another 143 wins & 198 nominations.', + Poster: + 'http://ia.media-imdb.com/images/M/MV5BMjAxMzY3NjcxNF5BMl5BanBnXkFtZTcwNTI5OTM0Mw@@._V1_SX300.jpg', + Metascore: '74', + imdbRating: '8.8', + imdbVotes: '1,446,708', + imdbID: 'tt1375666', + Type: 'movie', + Response: 'True', + }, + { + Title: 'Interstellar', + Year: '2014', + Rated: 'PG-13', + Released: '07 Nov 2014', + Runtime: '169 min', + Genre: 'Adventure, Drama, Sci-Fi', + Director: 'Christopher Nolan', + Writer: 'Jonathan Nolan, Christopher Nolan', + Actors: 'Ellen Burstyn, Matthew McConaughey, Mackenzie Foy, John Lithgow', + Plot: "A team of explorers travel through a wormhole in space in an attempt to ensure humanity's survival.", + Language: 'English', + Country: 'USA, UK', + Awards: 'Won 1 Oscar. Another 39 wins & 132 nominations.', + Poster: + 'http://ia.media-imdb.com/images/M/MV5BMjIxNTU4MzY4MF5BMl5BanBnXkFtZTgwMzM4ODI3MjE@._V1_SX300.jpg', + Metascore: '74', + imdbRating: '8.6', + imdbVotes: '910,366', + imdbID: 'tt0816692', + Type: 'movie', + Response: 'True', + }, + { + Title: 'The Dark Knight', + Year: '2008', + Rated: 'PG-13', + Released: '18 Jul 2008', + Runtime: '152 min', + Genre: 'Action, Adventure, Crime', + Director: 'Christopher Nolan', + Writer: + 'Jonathan Nolan (screenplay), Christopher Nolan (screenplay), Christopher Nolan (story), David S. Goyer (story), Bob Kane (characters)', + Actors: 'Christian Bale, Heath Ledger, Aaron Eckhart, Michael Caine', + Plot: 'When the menace known as the Joker wreaks havoc and chaos on the people of Gotham, the caped crusader must come to terms with one of the greatest psychological tests of his ability to fight injustice.', + Language: 'English, Mandarin', + Country: 'USA, UK', + Awards: 'Won 2 Oscars. Another 146 wins & 142 nominations.', + Poster: + 'http://ia.media-imdb.com/images/M/MV5BMTMxNTMwODM0NF5BMl5BanBnXkFtZTcwODAyMTk2Mw@@._V1_SX300.jpg', + Metascore: '82', + imdbRating: '9.0', + imdbVotes: '1,652,832', + imdbID: 'tt0468569', + Type: 'movie', + Response: 'True', + }, + { + Title: 'Batman Begins', + Year: '2005', + Rated: 'PG-13', + Released: '15 Jun 2005', + Runtime: '140 min', + Genre: 'Action, Adventure', + Director: 'Christopher Nolan', + Writer: + 'Bob Kane (characters), David S. Goyer (story), Christopher Nolan (screenplay), David S. Goyer (screenplay)', + Actors: 'Christian Bale, Michael Caine, Liam Neeson, Katie Holmes', + Plot: 'After training with his mentor, Batman begins his fight to free crime-ridden Gotham City from the corruption that Scarecrow and the League of Shadows have cast upon it.', + Language: 'English, Urdu, Mandarin', + Country: 'USA, UK', + Awards: 'Nominated for 1 Oscar. Another 15 wins & 66 nominations.', + Poster: + 'http://ia.media-imdb.com/images/M/MV5BNTM3OTc0MzM2OV5BMl5BanBnXkFtZTYwNzUwMTI3._V1_SX300.jpg', + Metascore: '70', + imdbRating: '8.3', + imdbVotes: '972,584', + imdbID: 'tt0372784', + Type: 'movie', + Response: 'True', + }, + { + Title: 'Avatar', + Year: '2009', + Rated: 'PG-13', + Released: '18 Dec 2009', + Runtime: '162 min', + Genre: 'Action, Adventure, Fantasy', + Director: 'James Cameron', + Writer: 'James Cameron', + Actors: 'Sam Worthington, Zoe Saldana, Sigourney Weaver, Stephen Lang', + Plot: 'A paraplegic marine dispatched to the moon Pandora on a unique mission becomes torn between following his orders and protecting the world he feels is his home.', + Language: 'English, Spanish', + Country: 'USA, UK', + Awards: 'Won 3 Oscars. Another 80 wins & 121 nominations.', + Poster: + 'http://ia.media-imdb.com/images/M/MV5BMTYwOTEwNjAzMl5BMl5BanBnXkFtZTcwODc5MTUwMw@@._V1_SX300.jpg', + Metascore: '83', + imdbRating: '7.9', + imdbVotes: '876,575', + imdbID: 'tt0499549', + Type: 'movie', + Response: 'True', + }, +]; + +function getRating(watchList) { + const averageRating = + watchList + .filter((film) => film.Director === 'Christopher Nolan') + .map((film) => Number(film.imdbRating)) + .reduce((sumOfRatings, rating) => sumOfRatings + rating) / + watchList.filter((film) => film.Director === 'Christopher Nolan').length; + return averageRating; +} + +console.log(getRating(watchList)); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/16.Use-Higher-Order-Functions-map-filter-or-reduce-to-Solve-a-Complex-Problem.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/16.Use-Higher-Order-Functions-map-filter-or-reduce-to-Solve-a-Complex-Problem.js new file mode 100644 index 0000000..361a5cf --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/16.Use-Higher-Order-Functions-map-filter-or-reduce-to-Solve-a-Complex-Problem.js @@ -0,0 +1,8 @@ +const squareList = (arr) => { + return arr + .filter((num) => num > 0 && num % parseInt(num) === 0) + .map((num) => Math.pow(num, 2)); +}; + +const squaredIntegers = squareList([-3, 4.8, 5, 3, -3.2]); +console.log(squaredIntegers); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/17.Sort-an-Array-Alphabetically-using-the-sort-Method.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/17.Sort-an-Array-Alphabetically-using-the-sort-Method.js new file mode 100644 index 0000000..2d7a260 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/17.Sort-an-Array-Alphabetically-using-the-sort-Method.js @@ -0,0 +1,5 @@ +function alphabeticalOrder(arr) { + return arr.sort(); +} + +alphabeticalOrder(['a', 'd', 'c', 'a', 'z', 'g']); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/18.Return-a-Sorted-Array-Without-Changing-the-Original-Array.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/18.Return-a-Sorted-Array-Without-Changing-the-Original-Array.js new file mode 100644 index 0000000..01f95cf --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/18.Return-a-Sorted-Array-Without-Changing-the-Original-Array.js @@ -0,0 +1,7 @@ +const globalArray = [5, 6, 3, 2, 9]; + +function nonMutatingSort(arr) { + return [].concat(arr).sort((a, b) => a - b); +} + +nonMutatingSort(globalArray); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/19.Split-a-String-into-an-Array-Using-the-split-Method.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/19.Split-a-String-into-an-Array-Using-the-split-Method.js new file mode 100644 index 0000000..49cda4f --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/19.Split-a-String-into-an-Array-Using-the-split-Method.js @@ -0,0 +1,5 @@ +function splitify(str) { + return str.split(/\s|\W/); +} + +splitify('Hello World,I-am code'); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/20.Combine-an-Array-into-a-String-Using-the-join-Method.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/20.Combine-an-Array-into-a-String-Using-the-join-Method.js new file mode 100644 index 0000000..dfdc218 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/20.Combine-an-Array-into-a-String-Using-the-join-Method.js @@ -0,0 +1,5 @@ +function sentensify(str) { + return str.split(/\s|\W/).join(' '); +} + +sentensify('May-the-force-be-with-you'); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/21.Apply-Functional-Programming-to-Convert-Strings-to-URL-Slugs.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/21.Apply-Functional-Programming-to-Convert-Strings-to-URL-Slugs.js new file mode 100644 index 0000000..75c1f9c --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/21.Apply-Functional-Programming-to-Convert-Strings-to-URL-Slugs.js @@ -0,0 +1,4 @@ +function urlSlug(title) { + return title.toLowerCase().trim().split(/\s+/).join('-'); +} +console.log(urlSlug('A Mind Needs Books Like A Sword Needs A Whetstone')); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/22.Use-the-every-Method-to-Check-that-Every-Element-in-an-Array-Meets-a-Criteria.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/22.Use-the-every-Method-to-Check-that-Every-Element-in-an-Array-Meets-a-Criteria.js new file mode 100644 index 0000000..cbd68cf --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/22.Use-the-every-Method-to-Check-that-Every-Element-in-an-Array-Meets-a-Criteria.js @@ -0,0 +1,5 @@ +function checkPositive(arr) { + return arr.every((x) => x > 0); +} + +checkPositive([1, 2, 3, -4, 5]); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/23.Use-the-some-Method-to-Check-that-Any-Elements-in-an-Array-Meet-a-Criteria.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/23.Use-the-some-Method-to-Check-that-Any-Elements-in-an-Array-Meet-a-Criteria.js new file mode 100644 index 0000000..3abf28b --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/23.Use-the-some-Method-to-Check-that-Any-Elements-in-an-Array-Meet-a-Criteria.js @@ -0,0 +1,5 @@ +function checkPositive(arr) { + return arr.some((x) => x > 0); +} + +checkPositive([1, 2, 3, -4, 5]); diff --git a/JavaScript Algorithms and Data Structures/08-Functional-Programming/24.Introduction-to-Currying-and-Partial-Application.js b/JavaScript Algorithms and Data Structures/08-Functional-Programming/24.Introduction-to-Currying-and-Partial-Application.js new file mode 100644 index 0000000..183be26 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/08-Functional-Programming/24.Introduction-to-Currying-and-Partial-Application.js @@ -0,0 +1,9 @@ +function add(x) { + return function (y) { + return function (z) { + return x + y + z; + }; + }; +} + +add(10)(20)(30); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/01.Sum-All-Numbers-in-a-Range.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/01.Sum-All-Numbers-in-a-Range.js new file mode 100644 index 0000000..18b7e71 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/01.Sum-All-Numbers-in-a-Range.js @@ -0,0 +1,20 @@ +function sumAll(arr) { + let sum = 0; + if (arr[0]>arr[1]) { + let i = arr[1]; + let j = arr[0]; + for (i; i<=j; i++){ + sum+=i; + } + } + else { + let i = arr[0]; + let j = arr[1]; + for (i; i<=j; i++){ + sum+=i; + } + } + return sum; +} + +console.log(sumAll([1, 4])); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/02.Diff-Two-Arrays.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/02.Diff-Two-Arrays.js new file mode 100644 index 0000000..248618d --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/02.Diff-Two-Arrays.js @@ -0,0 +1,7 @@ +function diffArray(arr1, arr2) { + return [...diff(arr1, arr2), ...diff(arr2, arr1)]; + + function diff(a, b) { + return a.filter(item => b.indexOf(item) === -1); + } +} diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/03.Seek-and-Destroy.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/03.Seek-and-Destroy.js new file mode 100644 index 0000000..999abc5 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/03.Seek-and-Destroy.js @@ -0,0 +1,8 @@ +function destroyer(arr) { + const valsToRemove = Array.from(arguments).slice(1); + return arr.filter(function(val) { + return !valsToRemove.includes(val); + }); +} + +console.log(destroyer([1, 2, 3, 1, 2, 3], 2, 3)); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/04.Where-art-thou.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/04.Where-art-thou.js new file mode 100644 index 0000000..a673428 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/04.Where-art-thou.js @@ -0,0 +1,11 @@ +function whatIsInAName(collection, source) { + const sourceKeys = Object.keys(source); + + return collection + .filter(obj => sourceKeys + .every(key => obj.hasOwnProperty(key) && + obj[key] === source[key])) + +} + +console.log(whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" })); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/05.Spinal-Tap-Case.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/05.Spinal-Tap-Case.js new file mode 100644 index 0000000..9041fd7 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/05.Spinal-Tap-Case.js @@ -0,0 +1,8 @@ +function spinalCase(str) { + return str + .split(/\s|_|(?=[A-Z])/) + .join("-") + .toLowerCase(); +} + +console.log(spinalCase('This Is Spinal Tap')); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/06.Pig-Latin.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/06.Pig-Latin.js new file mode 100644 index 0000000..764039f --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/06.Pig-Latin.js @@ -0,0 +1,7 @@ +function translatePigLatin(str) { + return str + .replace(/^[aeiou]\w*/, "$&way") + .replace(/(^[^aeiou]+)(\w*)/, "$2$1ay"); +} + +translatePigLatin("consonant"); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/07.Search-and-Replace.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/07.Search-and-Replace.js new file mode 100644 index 0000000..443ff4c --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/07.Search-and-Replace.js @@ -0,0 +1,10 @@ +function myReplace(str, before, after) { + const strArr = str.split(" "); + const [wordToReplace] = strArr.filter(item => item === before); + const replacement = wordToReplace[0] === wordToReplace[0].toUpperCase() + ? after[0].toUpperCase() + after.slice(1) + : after[0].toLowerCase() + after.slice(1); + return strArr.map(item => (item === before ? replacement : item)).join(" "); +} + +console.log(myReplace("A quick brown fox jumped over the lazy dog", "jumped", "leaped")); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/08.DNA-Pairing.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/08.DNA-Pairing.js new file mode 100644 index 0000000..428f9bd --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/08.DNA-Pairing.js @@ -0,0 +1,12 @@ +function pairElement(str) { + const pair = { + A: "T", + T: "A", + C: "G", + G: "C" + }; + + return str.split("").map(x=>[x, pair[x]]); +} + +console.log(pairElement("GCG")); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/09.Missing-letters.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/09.Missing-letters.js new file mode 100644 index 0000000..25fac44 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/09.Missing-letters.js @@ -0,0 +1,11 @@ +function fearNotLetter(str) { + var missing; + for(var i = 1; i a.concat(b)))]; +} + +console.log(uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1])); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/11.Convert-HTML-Entities.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/11.Convert-HTML-Entities.js new file mode 100644 index 0000000..c93065a --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/11.Convert-HTML-Entities.js @@ -0,0 +1,29 @@ +function convertHTML(str) { + var temp = str.split(""); + + for (var i = 0; i < temp.length; i++) { + switch (temp[i]) { + case "<": + temp[i] = "<"; + break; + case "&": + temp[i] = "&"; + break; + case ">": + temp[i] = ">"; + break; + case '"': + temp[i] = """; + break; + case "'": + temp[i] = "'"; + break; + } + } + + temp = temp.join(""); + return temp; +} + + +console.log(convertHTML("Dolce & Gabbana")); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/12.Sum-All-Odd-Fibonacci-Numbers.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/12.Sum-All-Odd-Fibonacci-Numbers.js new file mode 100644 index 0000000..215240a --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/12.Sum-All-Odd-Fibonacci-Numbers.js @@ -0,0 +1,15 @@ +function sumFibs(num) { + let prevNumber = 0; + let currNumber = 1; + let result = 0; + while (currNumber <= num) { + if (currNumber % 2 !== 0) { + result += currNumber; + } + currNumber += prevNumber; + prevNumber = currNumber - prevNumber; + } + + return result; +} +console.log(sumFibs(4)); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/13.Sum-All-Primes.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/13.Sum-All-Primes.js new file mode 100644 index 0000000..06a57cc --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/13.Sum-All-Primes.js @@ -0,0 +1,21 @@ +function sumPrimes(num) { + var sum = 0; + for(var i = 0; i <= num;i++){ + if(IsPrime(i)){ + sum += i; + } + } + return sum; +} + +function IsPrime(n){ + if(n <= 1) return false; + for(var j = 2; Math.pow(j,2) <= n;j++){ + if(n % j === 0) { + return false; + } + } + return true; +} + +sumPrimes(10); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/14.Smallest-Common-Multiple.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/14.Smallest-Common-Multiple.js new file mode 100644 index 0000000..ab064af --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/14.Smallest-Common-Multiple.js @@ -0,0 +1,16 @@ +function smallestCommons(arr) { + var max = Math.max(arr[0], arr[1]); + var min = Math.min(arr[0], arr[1]); + var mltple = max; + + for(var i = max; i >= min; i--){ + if(mltple % i !== 0){ + mltple += max; + i = max; + } + } + + return mltple; +} + +console.log(smallestCommons([1,5])); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/15.Drop-it.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/15.Drop-it.js new file mode 100644 index 0000000..872a765 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/15.Drop-it.js @@ -0,0 +1,10 @@ +function dropElements(arr, func) { + while (arr.length > 0 && !func(arr[0])) { + arr.shift(); + } + return arr; +} + +dropElements([1, 2, 3, 4], function (n) { + return n >= 3; +}); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/16.Steamroller.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/16.Steamroller.js new file mode 100644 index 0000000..2ba8dd6 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/16.Steamroller.js @@ -0,0 +1,17 @@ +function steamrollArray(arr) { + return arr + .toString() + .replace(',,', ',') + .split(',') + .map(function (v) { + if (v == '[object Object]') { + return {}; + } else if (isNaN(v)) { + return v; + } else { + return parseInt(v); + } + }); +} + +console.log(steamrollArray([1, [2], [3, [[4]]]])); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/17.Binary-Agents.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/17.Binary-Agents.js new file mode 100644 index 0000000..e65a07a --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/17.Binary-Agents.js @@ -0,0 +1,12 @@ +function binaryAgent(str) { + var biString = str.split(' '); + var uniString = []; + + for (var i = 0; i < biString.length; i++) { + uniString.push(String.fromCharCode(parseInt(biString[i], 2))); + } + + return uniString.join(''); +} + +console.log(binaryAgent("01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111")); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/18.Everything-Be-True.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/18.Everything-Be-True.js new file mode 100644 index 0000000..6ece230 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/18.Everything-Be-True.js @@ -0,0 +1,5 @@ +function truthCheck(collection, pre) { + return collection.every((obj) => obj[pre]); +} + +console.log(truthCheck([{name: "Quincy", role: "Founder", isBot: false}, {name: "Naomi", role: "", isBot: false}, {name: "Camperbot", role: "Bot", isBot: true}], "isBot")); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/19.Arguments-Optional.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/19.Arguments-Optional.js new file mode 100644 index 0000000..1c6a56e --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/19.Arguments-Optional.js @@ -0,0 +1,23 @@ +function addTogether() { + const [first, second] = arguments; + + if (typeof first !== 'number') { + return undefined; + } else if (arguments.length === 1) { + function addSecond(second) { + if (typeof second !== 'number') { + return undefined; + } else { + return first + second; + } + } + + return addSecond; + } else if (typeof second !== 'number') { + return undefined; + } else { + return first + second; + } +} + +console.log(addTogether(2,3)); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/20.Make-a-Person.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/20.Make-a-Person.js new file mode 100644 index 0000000..acf7f3b --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/20.Make-a-Person.js @@ -0,0 +1,30 @@ +const Person = function (firstAndLast) { + let fullName = firstAndLast; + + this.getFirstName = function () { + return fullName.split(' ')[0]; + }; + + this.getLastName = function () { + return fullName.split(' ')[1]; + }; + + this.getFullName = function () { + return fullName; + }; + + this.setFirstName = function (name) { + fullName = name + ' ' + fullName.split(' ')[1]; + }; + + this.setLastName = function (name) { + fullName = fullName.split(' ')[0] + ' ' + name; + }; + + this.setFullName = function (name) { + fullName = name; + }; +}; + +const bob = new Person('Bob Ross'); +console.log(bob.getFullName()); diff --git a/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/21.Map-the-Debris.js b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/21.Map-the-Debris.js new file mode 100644 index 0000000..d467406 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/09-Intermediate-Algorithm-Scripting/21.Map-the-Debris.js @@ -0,0 +1,20 @@ +function orbitalPeriod(arr) { + const GM = 398600.4418; + const earthRadius = 6367.4447; + + const newArr = JSON.parse(JSON.stringify(arr)); + + newArr.forEach(function (item) { + const tmp = Math.round( + 2 * Math.PI * Math.sqrt(Math.pow(earthRadius + item.avgAlt, 3) / GM) + ); + + delete item.avgAlt; + + item.orbitalPeriod = tmp; + }); + + return newArr; +} + +console.log(orbitalPeriod([{name : "sputnik", avgAlt : 35873.5553}])); diff --git a/JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Caesars-Cipher.js b/JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Caesars-Cipher.js new file mode 100644 index 0000000..0e2f57b --- /dev/null +++ b/JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Caesars-Cipher.js @@ -0,0 +1,23 @@ +function rot13(str) { + str = str.toUpperCase(); + var newStr = ""; + for (let i=0; i < str.length; i++){ + if (str.charCodeAt(i) >= 65 && str.charCodeAt(i) <= 90){ + //console.log(str.charCodeAt(i)); + var newCode = str.charCodeAt(i)+13; + if (newCode > 90){ + newCode = newCode - 90 + 64; + } + //console.log(newCode) + var newLetter = String.fromCharCode(newCode); + //console.log(str.charAt(i)) + newStr+=newLetter; + } + else newStr+=str.charAt(i); + } + + return newStr + +} + +rot13("SERR PBQR PNZC"); diff --git a/JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Cash-Register.js b/JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Cash-Register.js new file mode 100644 index 0000000..b60f112 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Cash-Register.js @@ -0,0 +1,62 @@ +function checkCashRegister(price, cash, cid) { + //const cidTotal = cid[0][1]*0.01+cid[1][1]*0.05+cid[2][1]*0.1+cid[3][1]*0.25+cid[4][1]*1+cid[5][1]*5+cid[6][1]*10+cid[7][1]*20+cid[8][1]*100; + let currency = [ + ["ONE HUNDRED", 100.00], + ["TWENTY", 20.00], + ["TEN", 10.00], + ["FIVE", 5.00], + ["ONE", 1.00], + ["QUARTER", 0.25], + ["DIME", 0.10], + ["NICKEL", 0.05], + ["PENNY", 0.01] + ]; + + let change = (cash-price).toFixed(2); + let cidTotal = 0; + for (let element of cid) { + cidTotal += element[1]; + } + cidTotal.toFixed(2); + + const output = { + status: "", + change: [] + } + + if (change == cidTotal){ + output.status = "CLOSED"; + output.change = cid; + } + + else if (change > cidTotal){ + output.status = "INSUFFICIENT_FUNDS"; + } + + else{ + cid.reverse(); + for (let i in currency){ + let returnMoney = 0; + //let noOfBills = cid[i][1]/currency[i][1]; + while(change >= currency[i][1] && cid[i][1]>0 && change!==0){ + change -= currency[i][1]; + cid[i][1] -= currency[i][1]; + returnMoney += currency[i][1]; + change = Math.round(change * 100) / 100; + //noOfBills-- + } + if(returnMoney>0) { + output.change.push([currency[i][0], returnMoney]) + output.status = "OPEN"; + } + } + if (change>0){ + output.status = "INSUFFICIENT_FUNDS"; + output.change = []; + } + } + console.log(output) + return output; +} + +checkCashRegister(19.5, 20, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]]); diff --git a/JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Palindrome-Checker.js b/JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Palindrome-Checker.js new file mode 100644 index 0000000..2d2ba23 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Palindrome-Checker.js @@ -0,0 +1,15 @@ +function palindrome(str) { + var regexPattern = /[^A-Za-z0-9+]/g; + var newStr = (str.replace(regexPattern, "")).toLowerCase(); + var palStr = newStr.split("").reverse().join(""); + if (newStr == palStr) + return true; + else return false; +} + +palindrome('eye'); + +/*** +let str = prompt("Please enter a string: "); +palindrome(str); +***/ diff --git a/JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Roman-Numeral-Converter.js b/JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Roman-Numeral-Converter.js new file mode 100644 index 0000000..6b6d8ec --- /dev/null +++ b/JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Roman-Numeral-Converter.js @@ -0,0 +1,60 @@ +function convertToRoman(num) { + var romanNum = ""; + while(num>0){ + if (num >=1000){ + romanNum+="M"; + num-=1000; + } + else if (num >= 900){ + romanNum+="CM"; + num-=900; + } + else if (num >= 500){ + romanNum+="D"; + num-=500; + } + else if (num >= 400){ + romanNum+="CD"; + num-=400; + } + else if (num >= 100){ + romanNum+="C"; + num-=100; + } + else if (num >= 90){ + romanNum+="XC"; + num-=90; + } + else if (num >= 50){ + romanNum+="L"; + num-=50; + } + else if (num >= 40){ + romanNum+="XL"; + num-=40; + } + else if (num >= 10){ + romanNum+="X"; + num-=10; + } + else if (num >= 9){ + romanNum+="IX"; + num-=9; + } + else if (num >= 5){ + romanNum+="V"; + num-=5; + } + else if (num >= 4){ + romanNum+="IV"; + num-=4; + } + else { + romanNum+="I"; + num-=1; + } + } + return romanNum; +} + +convertToRoman(36); diff --git a/JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Telephone-Number-Validator.js b/JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Telephone-Number-Validator.js new file mode 100644 index 0000000..96b39a9 --- /dev/null +++ b/JavaScript Algorithms and Data Structures/10-JavaScript-Algorithms-and-Data-Structures-Projects/Telephone-Number-Validator.js @@ -0,0 +1,10 @@ +function telephoneCheck(str) { + const re = /^(1\s?)?\d{3}([-\s]?)\d{3}\2\d{4}$/; + const re2 = /^(1\s?)?\(\d{3}\)\s?\d{3}[-\s]\d{4}$/; + if (re.test(str)) { + return true; + } + else {return re2.test(str) ? true : false} +} + +telephoneCheck("555-555-5555"); From d825ba677a43ffe589b78583ced27402404ed8df Mon Sep 17 00:00:00 2001 From: Yash Kumar <63447283+Yasholo@users.noreply.github.com> Date: Wed, 13 Sep 2023 15:35:31 +0530 Subject: [PATCH 4/7] Create README.md --- .../README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 JavaScript Algorithms and Data Structures/README.md diff --git a/JavaScript Algorithms and Data Structures/README.md b/JavaScript Algorithms and Data Structures/README.md new file mode 100644 index 0000000..aaf52dc --- /dev/null +++ b/JavaScript Algorithms and Data Structures/README.md @@ -0,0 +1,14 @@ +#### [JavaScript Algorithms and Data Structures Certification](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/) + +- [Basic JavaScript](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#basic-javascript) +- [ES6](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#es6) +- [Regular Expressions](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#regular-expressions) +- [Debugging](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#debugging) +- [Basic Data Structures](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#basic-data-structures) +- [Basic Algorithm Scripting](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#basic-algorithm-scripting) +- [Object-Oriented Programming](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#object-oriented-programming) +- [Functional Programming](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#functional-programming) +- [Intermediate Algorithm Scripting](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#intermediate-algorithm-scripting) +
    +
    + **Projects**: [Palindrome Checker](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/palindrome-checker),[ Roman Numeral Converter](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/roman-numeral-converter), [Caesar's Cipher](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher), [Telephone Number Validator](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator), [Cash Register](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/cash-register) From d96303f9f5494c173e785939841e8ed202d00cb4 Mon Sep 17 00:00:00 2001 From: Yash Kumar <63447283+Yasholo@users.noreply.github.com> Date: Wed, 13 Sep 2023 15:39:30 +0530 Subject: [PATCH 5/7] Update README.md --- JavaScript Algorithms and Data Structures/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/JavaScript Algorithms and Data Structures/README.md b/JavaScript Algorithms and Data Structures/README.md index aaf52dc..636be9a 100644 --- a/JavaScript Algorithms and Data Structures/README.md +++ b/JavaScript Algorithms and Data Structures/README.md @@ -1,3 +1,4 @@ +# FreeCodeCamp #### [JavaScript Algorithms and Data Structures Certification](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/) - [Basic JavaScript](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#basic-javascript) From 19ed469f6c91004ce0877bc2726f9f47de3b884f Mon Sep 17 00:00:00 2001 From: Yash Kumar <63447283+Yasholo@users.noreply.github.com> Date: Wed, 13 Sep 2023 16:02:08 +0530 Subject: [PATCH 6/7] Update README.md --- JavaScript Algorithms and Data Structures/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/JavaScript Algorithms and Data Structures/README.md b/JavaScript Algorithms and Data Structures/README.md index 636be9a..5cbdcc1 100644 --- a/JavaScript Algorithms and Data Structures/README.md +++ b/JavaScript Algorithms and Data Structures/README.md @@ -1,4 +1,5 @@ # FreeCodeCamp +[![freeCodeCamp Social Banner](https://s3.amazonaws.com/freecodecamp/wide-social-banner.png)](https://www.freecodecamp.org/) #### [JavaScript Algorithms and Data Structures Certification](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/) - [Basic JavaScript](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/#basic-javascript) From 909c9c05b5ffcb612d1766f31e06c1c6115be4f2 Mon Sep 17 00:00:00 2001 From: Yasholo Date: Thu, 14 Sep 2023 14:49:18 +0530 Subject: [PATCH 7/7] basic to do list --- JavaScript-todo-list/script.js | 51 +++++++++++++++++ JavaScript-todo-list/style.css | 101 +++++++++++++++++++++++++++++++++ JavaScript-todo-list/todo.html | 24 ++++++++ 3 files changed, 176 insertions(+) create mode 100755 JavaScript-todo-list/script.js create mode 100644 JavaScript-todo-list/style.css create mode 100644 JavaScript-todo-list/todo.html diff --git a/JavaScript-todo-list/script.js b/JavaScript-todo-list/script.js new file mode 100755 index 0000000..e08b357 --- /dev/null +++ b/JavaScript-todo-list/script.js @@ -0,0 +1,51 @@ +var myNodelist = document.getElementsByTagName("LI"); +var i; +for (i = 0; i < myNodelist.length; i++) { + var span = document.createElement("SPAN"); + var txt = document.createTextNode("\u00D7"); + span.className = "close"; + span.appendChild(txt); + myNodelist[i].appendChild(span); +} + +var close = document.getElementsByClassName("close"); +var i; +for (i = 0; i < close.length; i++) { + close[i].onclick = function() { + var div = this.parentElement; + div.style.display = "none"; + } +} + +var list = document.querySelector('ul'); +list.addEventListener('click', function(ev) { + if (ev.target.tagName === 'LI') { + ev.target.classList.toggle('checked'); + } +}, false); + +function newElement() { + var li = document.createElement("li"); + var inputValue = document.getElementById("myInput").value; + var t = document.createTextNode(inputValue); + li.appendChild(t); + if (inputValue === '') { + alert("You must write something!"); + } else { + document.getElementById("myUL").appendChild(li); + } + document.getElementById("myInput").value = ""; + + var span = document.createElement("SPAN"); + var txt = document.createTextNode("\u00D7"); + span.className = "close"; + span.appendChild(txt); + li.appendChild(span); + + for (i = 0; i < close.length; i++) { + close[i].onclick = function() { + var div = this.parentElement; + div.style.display = "none"; + } + } +} diff --git a/JavaScript-todo-list/style.css b/JavaScript-todo-list/style.css new file mode 100644 index 0000000..cc5c25e --- /dev/null +++ b/JavaScript-todo-list/style.css @@ -0,0 +1,101 @@ +* { + box-sizing: border-box; +} + +ul { + margin: 0; + padding: 0; +} + +ul li { + cursor: pointer; + position: relative; + padding: 12px 8px 12px 40px; + background: #eee; + font-size: 18px; + transition: 0.2s; + + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +ul li:nth-child(odd) { + background: #f9f9f9; +} + +ul li:hover { + background: #ddd; +} + +ul li.checked { + background: #888; + color: #fff; + text-decoration: line-through; +} + +ul li.checked::before { + content: ''; + position: absolute; + border-color: #fff; + border-style: solid; + border-width: 0 2px 2px 0; + top: 10px; + left: 16px; + transform: rotate(45deg); + height: 15px; + width: 7px; + } + + .close { + position: absolute; + right: 0; + top: 0; + padding: 12px 16px 12px 16px; + } + + .close:hover { + background-color: #f44336; + color: white; + } + + .header { + background-color: #ebae2a; + padding: 30px 40px; + color: white; + text-align: center; + } + + .header:after { + content: ""; + display: table; + clear: both; + } + + input { + margin: 0; + border: none; + border-radius: 0; + width: 75%; + padding: 10px; + float: left; + font-size: 16px; + } + + .addBtn { + padding: 9px; + width: 25%; + background: #d9d9d9; + color: #555; + float: left; + text-align: center; + font-size: 16px; + cursor: pointer; + transition: 0.3s; + border-radius: 0; + } + + .addBtn:hover { + background-color: green; + } \ No newline at end of file diff --git a/JavaScript-todo-list/todo.html b/JavaScript-todo-list/todo.html new file mode 100644 index 0000000..e03bbae --- /dev/null +++ b/JavaScript-todo-list/todo.html @@ -0,0 +1,24 @@ + + + + + To-do-list + + + +
    +

    My To Do List

    + + Add +
    +
      +
    • Hit the gym
    • +
    • Pay bills
    • +
    • Meet George
    • +
    • Buy eggs
    • +
    • Read a book
    • +
    • Organize office
    • +
    + + + \ No newline at end of file