├── .github └── workflows │ ├── docker.yml │ ├── publish.yml │ └── releases.yml ├── .gitignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── README.md ├── SECURITY.md ├── _config.yml ├── assets ├── bmc-button.svg └── javascript.svg ├── index.js ├── package.json ├── public ├── index.html ├── script.js └── style.css ├── pull_request_template.md └── releases.json /.github/workflows/docker.yml: -------------------------------------------------------------------------------- 1 | name: Build and Publish Docker Image to DockerHub 2 | 3 | on: 4 | push: 5 | branches: ["main"] 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - uses: actions/checkout@v3 13 | 14 | - name: DockerHub Login 15 | uses: docker/login-action@v2.1.0 16 | with: 17 | username: ${{ secrets.DOCKERHUB_USERNAME }} 18 | password: ${{ secrets.DOCKERHUB_PASSWORD }} 19 | 20 | - name: Build the Docker image 21 | run: docker build . --file Dockerfile --tag ${{ secrets.DOCKERHUB_USERNAME }}/learn-javascript 22 | 23 | - name: Docker Push 24 | run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/learn-javascript -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: NPM Package 2 | 3 | on: 4 | release: 5 | types: [published] 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v3 12 | - uses: actions/setup-node@v3 13 | with: 14 | node-version: 16 15 | - run: | 16 | if [ ! -f package-lock.json ]; then 17 | npm install 18 | else 19 | npm ci 20 | fi 21 | 22 | publish-npm: 23 | needs: build 24 | runs-on: ubuntu-latest 25 | steps: 26 | - uses: actions/checkout@v3 27 | - uses: actions/setup-node@v3 28 | with: 29 | node-version: 16 30 | registry-url: https://registry.npmjs.org/ 31 | - run: | 32 | if [ ! -f package-lock.json ]; then 33 | npm install 34 | else 35 | npm ci 36 | fi 37 | - run: npm publish 38 | env: 39 | NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} -------------------------------------------------------------------------------- /.github/workflows/releases.yml: -------------------------------------------------------------------------------- 1 | name: Releases 2 | on: 3 | push: 4 | branches: 5 | - main 6 | 7 | jobs: 8 | changelog: 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - uses: actions/checkout@v2 13 | 14 | - name: conventional Changelog Action 15 | id: changelog 16 | uses: TriPSs/conventional-changelog-action@v3.7.1 17 | with: 18 | github-token: ${{ secrets.PA_TOKEN }} 19 | version-file: './releases.json,./package.json' 20 | 21 | - name: create release 22 | uses: actions/create-release@v1 23 | if: ${{ steps.changelog.outputs.skipped == 'false' }} 24 | env: 25 | GITHUB_TOKEN: ${{ secrets.PA_TOKEN }} 26 | with: 27 | tag_name: ${{ steps.changelog.outputs.tag }} 28 | release_name: ${{ steps.changelog.outputs.tag }} 29 | body: ${{ steps.changelog.outputs.clean_changelog }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Dependency directories 7 | node_modules/ 8 | 9 | # Built files 10 | dist/ 11 | build/ 12 | out/ 13 | dist_electron/ 14 | dist_electron_debug/ 15 | dist_electron_release/ 16 | 17 | # .env files 18 | .env 19 | .env.local 20 | .env.*.local 21 | .env.development.local 22 | .env.test.local 23 | .env.production.local 24 | 25 | # Other generated files 26 | *.pid 27 | *.lock 28 | *.seed 29 | *.csv 30 | 31 | # Editor files 32 | .vscode/ 33 | .idea/ 34 | *.iml 35 | *.swp 36 | *.swo 37 | 38 | # OS generated files 39 | .DS_Store 40 | Thumbs.db 41 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [1.18.1](https://github.com/manthanank/learn-javascript/compare/v1.18.0...v1.18.1) (2025-02-04) 2 | 3 | 4 | ### Bug Fixes 5 | 6 | * Correct console output comments in README.md for arithmetic operations ([8f233a9](https://github.com/manthanank/learn-javascript/commit/8f233a991ae4c3b9bec97e7f26b983dd82ccdfbc)) 7 | 8 | 9 | 10 | # [1.18.0](https://github.com/manthanank/learn-javascript/compare/v1.17.0...v1.18.0) (2024-10-15) 11 | 12 | 13 | ### Features 14 | 15 | * Add functions for string manipulation and binary tree operations ([dbfda3d](https://github.com/manthanank/learn-javascript/commit/dbfda3d3f3bbaef81b9e1604decccde69ee4ba8f)) 16 | 17 | 18 | 19 | # [1.17.0](https://github.com/manthanank/learn-javascript/compare/v1.16.0...v1.17.0) (2024-10-15) 20 | 21 | 22 | ### Features 23 | 24 | * Add functions for finding the largest and smallest elements in an array ([7425631](https://github.com/manthanank/learn-javascript/commit/7425631c79c690b239e205907ba112eea46fc907)) 25 | 26 | 27 | 28 | # [1.16.0](https://github.com/manthanank/learn-javascript/compare/v1.15.0...v1.16.0) (2024-10-07) 29 | 30 | 31 | ### Features 32 | 33 | * Add functions for sorting, finding max/min, sum/average, prime/palindrome checks, and duplicate removal ([4042709](https://github.com/manthanank/learn-javascript/commit/40427091267a271b2ec3160f4d47563fd53a2a07)) 34 | 35 | 36 | 37 | # [1.15.0](https://github.com/manthanank/learn-javascript/compare/v1.14.0...v1.15.0) (2024-10-06) 38 | 39 | 40 | ### Features 41 | 42 | * Add functions for sorting, finding max/min, sum/average, prime/palindrome checks, and duplicate removal ([76cba6f](https://github.com/manthanank/learn-javascript/commit/76cba6fb77c9126281e2920b6a04017900b04a74)) 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | https://manthanank.github.io/contact. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Thank you for considering contributing to this project! By this, you 4 | agree to abide by the [Code Of Conduct](https://github.com/manthanank/learn-javascript/blob/main/CODE_OF_CONDUCT.md). 5 | 6 | ## How to Contribute 7 | 8 | - If you find a bug, please [open an issue](https://github.com/manthanank/learn-javascript/issues). 9 | - If you want to contribute code, please follow these steps: 10 | 1. Fork the repository. 11 | 2. Create a new branch for your feature or bug fix. 12 | 3. Make your changes and submit a pull request. 13 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Use Node.js 14 LTS version as base image 2 | FROM node:14 3 | 4 | # Set the working directory in the container 5 | WORKDIR /app 6 | 7 | # Copy package.json and package-lock.json to the working directory 8 | COPY package*.json ./ 9 | 10 | # Install dependencies 11 | RUN npm install 12 | 13 | # Copy all files from the current directory to the working directory in the container 14 | COPY . . 15 | 16 | # Expose the port the app runs on 17 | EXPOSE 3000 18 | 19 | # Command to run the application 20 | CMD ["node", "index.js"] 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Manthan Ankolekar 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Use this section to tell people about which versions of your project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | | ------- | ------------------ | 10 | | 5.1.x | :white_check_mark: | 11 | | 5.0.x | :x: | 12 | | 4.0.x | :white_check_mark: | 13 | | < 4.0 | :x: | 14 | 15 | ## Reporting a Vulnerability 16 | 17 | Use this section to tell people how to report a vulnerability. 18 | 19 | Tell them where to go, how often they can expect to get an update on a 20 | reported vulnerability, what to expect if the vulnerability is accepted or 21 | declined, etc. 22 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman 2 | -------------------------------------------------------------------------------- /assets/bmc-button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /assets/javascript.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | console.log("Thanks for using learn-javascript!"); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "learn-javascript", 3 | "version": "1.18.1", 4 | "description": "Complete JavaScript with all resources to learn.", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "node index.js" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/manthanank/learn-javascript.git" 13 | }, 14 | "keywords": [ 15 | "javascript" 16 | ], 17 | "author": "Manthan Ank", 18 | "license": "ISC", 19 | "bugs": { 20 | "url": "https://github.com/manthanank/learn-javascript/issues" 21 | }, 22 | "homepage": "https://github.com/manthanank/learn-javascript#readme" 23 | } -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Webpage 9 | 10 | 11 | 12 | 13 |

Welcome to the Page

14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /public/script.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manthanank/learn-javascript/33675ffa5676e337a9b4cc71ec5a9851579981f7/public/script.js -------------------------------------------------------------------------------- /public/style.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | text-align: center; 3 | } -------------------------------------------------------------------------------- /pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Describe your changes 2 | 3 | ## Issue ticket number and link 4 | 5 | ## Checklist before requesting a review 6 | - [ ] I have performed a self-review of my code 7 | - [ ] If it is a core feature, I have added thorough tests. 8 | - [ ] Do we need to implement analytics? 9 | - [ ] Will this be part of a product update? If yes, please write one phrase about this update. 10 | -------------------------------------------------------------------------------- /releases.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.18.1" 3 | } --------------------------------------------------------------------------------