{"id":14965988,"url":"https://github.com/willyhorizont/learn_programming_languages_with_javascript","last_synced_at":"2025-10-07T19:50:30.528Z","repository":{"id":204154815,"uuid":"682673455","full_name":"willyhorizont/learn_programming_languages_with_javascript","owner":"willyhorizont","description":"I am exploring and learning programming languages that share similarities with JavaScript.","archived":false,"fork":false,"pushed_at":"2025-02-21T19:35:18.000Z","size":2386,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-19T13:41:30.804Z","etag":null,"topics":["csharp","dart","go","javascript","julia","kotlin","lua","matlab","perl","php","python","r","raku","ruby","scala","swift","vbnet","wolfram"],"latest_commit_sha":null,"homepage":"","language":"Go","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/willyhorizont.png","metadata":{"files":{"readme":"readme.txt","changelog":"changelog.txt","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,"zenodo":null}},"created_at":"2023-08-24T17:18:25.000Z","updated_at":"2025-05-20T14:09:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"9961a621-dbd2-42e8-9f7b-555237a622fe","html_url":"https://github.com/willyhorizont/learn_programming_languages_with_javascript","commit_stats":{"total_commits":59,"total_committers":2,"mean_commits":29.5,"dds":"0.016949152542372836","last_synced_commit":"673fa6f22806b33e626812ba4e281c9b0ce23114"},"previous_names":["willyhorizont/learn_programming_languages_with_javascript"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/willyhorizont/learn_programming_languages_with_javascript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willyhorizont%2Flearn_programming_languages_with_javascript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willyhorizont%2Flearn_programming_languages_with_javascript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willyhorizont%2Flearn_programming_languages_with_javascript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willyhorizont%2Flearn_programming_languages_with_javascript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willyhorizont","download_url":"https://codeload.github.com/willyhorizont/learn_programming_languages_with_javascript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willyhorizont%2Flearn_programming_languages_with_javascript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278838046,"owners_count":26054720,"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-10-07T02:00:06.786Z","response_time":59,"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":["csharp","dart","go","javascript","julia","kotlin","lua","matlab","perl","php","python","r","raku","ruby","scala","swift","vbnet","wolfram"],"created_at":"2024-09-24T13:35:39.542Z","updated_at":"2025-10-07T19:50:30.510Z","avatar_url":"https://github.com/willyhorizont.png","language":"Go","readme":"In this repository, I am attempting to learn every programming language that has behavior and capabilities similar to JavaScript, like:\n1. variable can store dynamic data type and dynamic value, variable can inferred data type from value, value of variable can be reassign with different data type or has option to make variable can store dynamic data type and dynamic value\n    ```javascript\n    let something = \"foo\";\n    console.log(`something: ${something}`);\n    something = 123;\n    console.log(`something: ${something}`);\n    something = true;\n    console.log(`something: ${something}`);\n    something = null;\n    console.log(`something: ${something}`);\n    something = [1, 2, 3];\n    console.log(`something: ${something}`);\n    something = { \"foo\": \"bar\" };\n    console.log(`something: ${something}`);\n    ```\n    ```go\n    type Any interface{}\n    ```\n2. it is possible to access and modify variables defined outside of the current scope within nested functions, so it is possible to have closure too\n    ```javascript\n    function getModifiedIndentLevel() {\n        let indentLevel = 0;\n        function changeIndentLevel() {\n            indentLevel += 1;\n            if (indentLevel \u003c 5) changeIndentLevel();\n            return indentLevel;\n        }\n        return changeIndentLevel();\n    }\n    console.log(`getModifiedIndentLevel(): ${getModifiedIndentLevel()}`);\n    function createNewGame(initialCredit) {\n        let currentCredit = initialCredit;\n        console.log(`initial credit: ${initialCredit}`);\n        return function () {\n            currentCredit -= 1;\n            if (currentCredit === 0) {\n                console.log(\"not enough credits\");\n                return;\n            }\n            console.log(`playing game, ${currentCredit} credit(s) remaining`);\n        };\n    }\n    const playGame = createNewGame(3);\n    playGame();\n    playGame();\n    playGame();\n    ```\n3. object/dictionary/associative-array/hash/hashmap/map/unordered-list-key-value-pair-data-structure can store dynamic data type and dynamic value\n    ```javascript\n    const myObject = {\n        \"my_string\": \"foo\",\n        \"my_number\": 123,\n        \"my_bool\": true,\n        \"my_null\": null,\n        \"my_array\": [1, 2, 3],\n        \"my_object\": {\n            \"foo\": \"bar\"\n        }\n    };\n    console.log(`myObject: ${myObject}`);\n    ```\n4. array/list/slice/ordered-list-data-structure can store dynamic data type and dynamic value\n    ```javascript\n    const myArray = [\"foo\", 123, true, null, [1, 2, 3], { \"foo\": \"bar\" }];\n    console.log(`myArray: ${myArray}`);\n    ```\n5. support passing functions as arguments to other functions\n    ```javascript\n    function sayHello(callbackFunction) {\n        console.log(\"hello\");\n        callbackFunction();\n    }\n    function sayHowAreYou() {\n        console.log(\"how are you?\");\n    }\n    sayHello(sayHowAreYou);\n    sayHello(function () {\n        console.log(\"how are you?\");\n    });\n    ```\n6. support returning functions as values from other functions\n    ```javascript\n    function multiply(a) {\n        return function (b) {\n            return (a * b);\n        };\n    }\n    const multiplyBy2 = multiply(2);\n    const multiplyBy2Result = multiplyBy2(10);\n    console.log(`multiplyBy2Result: ${multiplyBy2Result}`);\n    ```\n7. support assigning functions to variables\n    ```javascript\n    const getRectangleAreaV1 = function (rectangleWidth, rectangleLength) {\n        return (rectangleWidth * rectangleLength);\n    };\n    console.log(`getRectangleAreaV1(7, 5): ${getRectangleAreaV1(7, 5)}`);\n    const getRectangleAreaV2 = (rectangleWidth, rectangleLength) =\u003e {\n        return (rectangleWidth * rectangleLength);\n    };\n    console.log(`getRectangleAreaV2(7, 5): ${getRectangleAreaV2(7, 5)}`);\n    const getRectangleAreaV3 = (rectangleWidth, rectangleLength) =\u003e (rectangleWidth * rectangleLength);\n    console.log(`getRectangleAreaV3(7, 5): ${getRectangleAreaV3(7, 5)}`);\n    ```\n8. support storing functions in data structures like array/list/slice/ordered-list-data-structure or object/dictionary/associative-array/hash/hashmap/map/unordered-list-key-value-pair-data-structure\n    ```javascript\n    const myArray2 = [\n        function (a, b) {\n            return (a * b);\n        },\n        \"foo\",\n        123,\n        true,\n        null,\n        [1, 2, 3],\n        { \"foo\": \"bar\" }\n    ];\n    console.log(`myArray2[0](7, 5): ${myArray2[0](7, 5)}`);\n    const myObject2 = {\n        \"my_function\": function (a, b) {\n            return (a * b);\n        },\n        \"my_string\": \"foo\",\n        \"my_number\": 123,\n        \"my_bool\": true,\n        \"my_null\": null,\n        \"my_array\": [1, 2, 3],\n        \"my_object\": {\n            \"foo\": \"bar\"\n        }\n    }\n    console.log(`myObject2[\"my_function\"](7, 5): ${myObject2[\"my_function\"](7, 5)}`);\n    ```\n\nHOW TO RUN THE CODES:\n\nto run JavaScript code:\n1. cd codes/javascript/src\n2. node filename.js\n\nto run Python code:\n1. cd codes/python\n2. python filename.py\n\nto run PHP code:\n1. cd codes/php\n2. php ./filename.php\n\nto run Go code:\n1. cd codes/go/foldername\n2. go run filename.go\n\nto run Perl code:\n1. cd codes/perl\n2. perl filename.pl\n\nto run Julia code:\n1. cd codes/julia\n2. julia filename.jl\n\nto run Lua code:\n1. cd codes/lua\n2. lua filename.lua\n\nto run Ruby code:\n1. cd codes/ruby\n2. ruby filename.rb\n\nto run R code:\n1. cd codes/r\n2. Rscript filename.r\n\nto compile and run Kotlin code:\n1. cd codes/kotlin\n2. kotlinc filename.kt -include-runtime -d filename.jar \u0026\u0026 kotlin filename.jar\n\nto compile and run Swift code:\n1. cd codes/swift\n2. swiftc filename.swift \u0026\u0026 ./filename\n\nto run Dart code:\n1. cd codes/dart\n2. dart run filename.dart\n\nto compile and run Visual Basic (.NET) code:\n1. cd codes/visual_basic_dotnet\n2. vbc filename.vb \u0026\u0026 ./filename.exe\n\nto compile and run C# code:\n1. cd codes/c#\n2. csc filename.cs \u0026\u0026 ./filename.exe\n\nto run Matlab code:\n1. cd codes/matlab\n2. matlab -batch run('filename.m');\n\nto run Octave code:\n1. cd codes/gnu_octave\n2. octave-cli filename.m\n\nto run Wolfram code:\n1. cd codes/wolfram\n2. wolframscript -file filename.wls\n\nto run Raku code:\n1. cd codes/raku\n2. raku filename.raku\n\nto run Scala code:\n1. cd codes/scala\n2. scala filename.scala\n\nhttps://github.com/willyhorizont\nhttps://github.com/willyhorizont/learn_programming_languages_with_javascript\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillyhorizont%2Flearn_programming_languages_with_javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillyhorizont%2Flearn_programming_languages_with_javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillyhorizont%2Flearn_programming_languages_with_javascript/lists"}