{"id":30512747,"url":"https://github.com/teddybear182/easylang-web","last_synced_at":"2025-10-28T00:32:38.928Z","repository":{"id":300472550,"uuid":"1003225306","full_name":"Teddybear182/easylang-web","owner":"Teddybear182","description":"Language made in JavaScript","archived":false,"fork":false,"pushed_at":"2025-08-07T20:42:42.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-07T22:18:40.033Z","etag":null,"topics":["interpreter","javascript","language","parser"],"latest_commit_sha":null,"homepage":"https://teddybear182.github.io/easylang-web/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Teddybear182.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-06-16T20:23:17.000Z","updated_at":"2025-08-07T21:03:30.000Z","dependencies_parsed_at":"2025-08-07T22:18:40.319Z","dependency_job_id":null,"html_url":"https://github.com/Teddybear182/easylang-web","commit_stats":null,"previous_names":["teddybear182/easylang-js","teddybear182/easylang-web"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Teddybear182/easylang-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teddybear182%2Feasylang-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teddybear182%2Feasylang-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teddybear182%2Feasylang-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teddybear182%2Feasylang-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Teddybear182","download_url":"https://codeload.github.com/Teddybear182/easylang-web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teddybear182%2Feasylang-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272174834,"owners_count":24886296,"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","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["interpreter","javascript","language","parser"],"created_at":"2025-08-26T05:08:14.863Z","updated_at":"2025-10-28T00:32:33.888Z","avatar_url":"https://github.com/Teddybear182.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EasyLang\n\nThis is a programming language made in JavaScript for beginners, who want to learn programming basics. It was made for fun so there may be some bugs.\n\n# Usage\n\nThis repository is actually a web version of this language, so you dont need to install any packages, just go to the domain of the language and code!\n\n# Documentation\n\n## Variable declaration\n\nvariables that can be changed are created with \"var\":\n\n```cs\nvar x = 1\n```\n\nconstants, in another words variables, that can't be changed are initialized with a keyword \"const\", just like in JavaScript!:\n\n```cs\nconst x = \"you cannot change this variable lol\"\n```\n\n## Data structures\n\n- ### Strings\n  Strings can be created with \"\"\n  ```cs\n  const x = \"you cannot change this variable lol\"\n  ```\n- ### Integers\n  Numbers(the same as integers)\n  ```cs\n  const x = 1\n  ```\n- ### Floats\n  Numbers(the same as integers)\n  ```cs\n  const x = 5.5\n  ```\n- ### Objects\n  Objects here are similar to JSON objects! :)\n  ```cs\n  const x = { a: 5, b: \"this is a string\", c: { x: 67 } }\n  ```\n- ### Arrays\n  Arrays are like objects but its elements don't have keys\n  ```cs\n  const x = [1, \"string\", {a:1,b:5,c:true}]\n  ```\n- ### Bools\n  Bools are either true or false\n  ```cs\n  const x = [true,false]\n  ```\n  Bools in this language are not real, they are native variables and get evaluated into 0 or 1\n- ### Null\n  Null is empty value\n  ```cs\n  var x = null\n  ```\n\n## Functions\n\nSo functions is very interesting in this language - it can behave like a class\n\n```cs\ntask main(){\n  task add(a,b){\n    write(a+b)\n  }\n  task substract(a,b){\n    write(a-b)\n  }\n}\n\nconst func = main() //-\u003e runs main, and gets every function and variable in the main\nfunc.add(5,8)\nfunc.substract(67,5)\n```\n\nOr functions can be normal functions:\n\n```cs\ntask helloworld(){\n  write(\"hello world!\")\n}\n\nhelloworld()\n```\n\n## Basic binary operations\n\nThere are multiple binary operations in EasyLang:\n\n- Addition\n\n```cs\nwrite(2+2)\n```\n\n- Substraction\n\n```cs\nwrite(2-2)\n```\n\n- Multiplication\n\n```cs\nwrite(2*2)\n```\n\n- Division\n\n```cs\nwrite(2/2)\n```\n\n- Modulo\n\n```cs\nwrite(10%3)\n```\n\n## Logical binary operations\n\nThere are also many logical binary operations in EasyLang:\n\n- AND\n\n```cs\nwrite(false and true) // -\u003e output must be 0, so false\n```\n\n- OR\n\n```cs\nwrite(true or 2) // -\u003e output must be 1, so true\n```\n\n- less than\n\n```cs\nwrite(2\u003c3) // -\u003e output must be 1, so true\n```\n\n- less than or equals\n\n```cs\nwrite(3\u003c=2) // -\u003e output must be 0, so false\n```\n\n- greater than\n\n```cs\nwrite(10\u003e3) // -\u003e output must be 1, so true\n```\n\n- greater than or equals\n\n```cs\nwrite(3\u003e=3) // -\u003e output must be 1, so true\n```\n\n- equals\n\n```cs\nwrite(2+2==4) // -\u003e output must be 1, so true\n```\n\n## If statements\n\nIf statements in EasyLang are very simple -\u003e if keyword, condition, body:\n\n```cs\nvar x = 5\nif(x==5){\n  write(\"x is 5!\")\n}\n```\n\nYou can do also if-else statement:\n\n```cs\nvar x = 6\nif(x\u003c5){\n  write(\"x is less than 5!\")\n} else {\n  write(\"x is greater than 5!\")\n}\n```\n\n## Loops\n\nThere are two types of loops: quick one and normal\n\nQuick one:\n\n```cs\nloop(i:10){\n  write(i)\n}\n```\n\nNormal one:\n\n```cs\nvar i = 0\nwhile(i\u003c10){\n  write(i)\n  i=i+1\n}\n```\n\n## Native functions and variables\n\n- `input()` -\u003e takes input from user, unfortunately in browser if its in the loop it can freeze other script and ui until the loop ends :(\n- `write()` -\u003e simply outputs the value\n- `int()` -\u003e takes a value as an argument and returns the parsed number version\n- `toString()` -\u003e takes a value as an argument and returns the parsed string version\n- `math.sqrt()` -\u003e takes a number as an argument and returns its square root\n- `math.Pi` -\u003e returns Pi\n- `math.round()` -\u003e takes a number as an argument and returns the nearest integer\n- `math.cos()` -\u003e takes a number as an argument and returns its cosine\n- `math.sin()` -\u003e takes a number as an argument and returns its sine\n- `math.random()` -\u003e takes a minimum and maximum value as arguments and returns a random number between them\n- `string.len(string)` -\u003e returns length of the string\n- `string.split(string, char)` -\u003e splits the string into an array and returns it\n- `string.matches(string, pattern)` -\u003e takes a string and a regular expression as arguments and returns the match(IMPORTANT! As the second argument you need to input regexp _without_ slashes, so like this -\u003e '^(hello)')\n- `string.replace(string, target, replacement)` -\u003e returns a copy of the string where all occurrences of target are replaced with replacement\n\n# Thats all, all bugs please report in issues and have fun!:D\n\n## Also, huge thanks for [Tyler Laceby](https://github.com/tlaceby) for his amazing [series of videos](https://youtu.be/8VB5TY1sIRo?si=Bva4mwzAWNRfgMGq) explaining how parser and interpreter work!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteddybear182%2Feasylang-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteddybear182%2Feasylang-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteddybear182%2Feasylang-web/lists"}