{"id":20003202,"url":"https://github.com/mbrsagor/javascriptnote","last_synced_at":"2025-07-21T12:38:41.642Z","repository":{"id":37560027,"uuid":"241791089","full_name":"mbrsagor/JavaScriptNote","owner":"mbrsagor","description":"JavaScript ES6 tutorial ","archived":false,"fork":false,"pushed_at":"2025-01-22T18:19:53.000Z","size":1634,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T08:06:00.416Z","etag":null,"topics":["es5-javascript","es6-javascript","javascript-es6-tutorial","oop"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbrsagor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-20T04:15:38.000Z","updated_at":"2025-01-22T18:19:56.000Z","dependencies_parsed_at":"2023-02-08T05:45:45.751Z","dependency_job_id":"53a22b7c-148c-43b3-b683-df8ee340d643","html_url":"https://github.com/mbrsagor/JavaScriptNote","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbrsagor%2FJavaScriptNote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbrsagor%2FJavaScriptNote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbrsagor%2FJavaScriptNote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbrsagor%2FJavaScriptNote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbrsagor","download_url":"https://codeload.github.com/mbrsagor/JavaScriptNote/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252357302,"owners_count":21735119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["es5-javascript","es6-javascript","javascript-es6-tutorial","oop"],"created_at":"2024-11-13T05:24:36.583Z","updated_at":"2025-05-04T15:34:48.816Z","avatar_url":"https://github.com/mbrsagor.png","language":"JavaScript","readme":"# JavaScript\n\n\u003e Coding with `Bozlur Rosid Sagor`\n\nIn this topic I will use to visual stdio code(vs-code). First install `node.js` and `NPM`(node package manager) then install `vs-code` in your system. JavaScript `ES6` features is awesome if you learn the `ES6` you may easily handel `react, VUE, Angular` project.\n\n```javascript\nmy_bio = () =\u003e \"A simplest changes make huge difference.\";\n```\n\n ##### Install Node on Mac.\n First, install Homebrew.\n ``/usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"``\n \n Then you may follow the command\n ```\n brew update\n brew doctor\n ```\n Next, add Homebrew’s location to your $PATH in your .bash_profile or .zshrc file.\n ```\nexport PATH=\"/usr/local/bin:$PATH\"\nbrew install node\nnpm install -g grunt-cli\n```\n##### Check the node and NPM version both:\n```\nnpm -v\nnode -v\n```\n\n###### Features:\n- ES6 basic\n    - Variable data type\n    - Map\n    - Filter\n    - Conditional Statement\n- Special data type\n    - Fibonacci\n    - Factorial\n    - Recursion\n    - Stack\n    - Queue\n    - Link list\n    - Binary search\n\n- Loop\n    - For loop\n    - While loop\n    - Do while loop\n\n- Function\n    - Old function\n    - Arrow function\n    - Callback function\n    - Promise\n\n- OOP\n    - Class\n    - Constructor\n    - Object \n\n\n###### Intro of `filter` method\n\n```javascript\narrayObject.filter(callback, contextObject);\n```\nThe `filter()` method creates a new array with all the elements that pass the test implemented by the `callback()` function.\nInternally, the `filter()` method iterates over each element of the array and pass each element to the `callback` function. If the `callback` function returns `true`, it includes the element in the return array.\nThe `filter()` method accepts two named arguments: a `callback` function and an optional object.\n\n\n###### Generator in javascript: Base64 converter\n```javascript\n// Helper function to convert file to Base64\n  const convertToBase64 = (file) =\u003e {\n    return new Promise((resolve, reject) =\u003e {\n      const reader = new FileReader();\n      reader.onload = () =\u003e resolve(reader.result);\n      reader.onerror = (error) =\u003e reject(error);\n      reader.readAsDataURL(file);\n    });\n  };\n```\n\n####### Convert:\n```javascript\nconst handleFileChange = async (event) =\u003e {\n    const file = event.target.files[0];\n    if (file) {\n      try {\n        const base64 = await convertToBase64(file);\n        setIcon(base64); // Save Base64 string\n      } catch (err) {\n        console.error(\"Error converting file to Base64:\", err);\n      }\n    }\n  };\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbrsagor%2Fjavascriptnote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbrsagor%2Fjavascriptnote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbrsagor%2Fjavascriptnote/lists"}