Basic JavaScript: Passing Values to Functions with Arguments
See original GitHub issueDescribe your problem and how to reproduce it:
The challenge instructions say:
- Call the function with two numbers as arguments.
But you can only pass positive integers. I suggest that either the instruction is changed to:
- Call the function with two positive integers as arguments.
or the regex should be changed to:
^\s*functionWithArgs\s*\(\s*[-+]?[0-9]*\.?[0-9]*.\s*,\s*[-+]?[0-9]*\.?[0-9]*.\s*\)\s*`
so that it can accept negatives and decimals.
Changing the regex would probably be simpler because it could be changed across all the language files without having to worry about translation. Plus it would probably be easier for the average reader to understand - not changing the instructions.
I can handle this once there is agreement.
Add a Link to the page with the problem:
Tell us about your browser and operating system:
- Browser Name: Chrome
- Browser Version: Version 85.0.4183.121 (Official Build) (64-bit)
- Operating System: Macbook Catalina
If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box):
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
Passing Values to Functions with Arguments - GitHub
Passing Values to Functions with Arguments ... Parameters are variables that act as placeholders for the values that are to be input to...
Read more >Passing-values-to-functions-with-arguments - JavaScript
When you are defining a function, you can specify variables for that functions scope. The variables will only be available within that function...
Read more >JavaScript Function Parameters - W3Schools
Arguments are Passed by Value. The parameters, in a function call, are the function's arguments. JavaScript arguments are passed by value: The function...
Read more >Understanding JavaScript Pass By Value
In JavaScript, all function arguments are always passed by value. It means that JavaScript copies the values of the variables into the function...
Read more >Pass by Value and Pass by Reference in Javascript
Pass by Reference: In Pass by Reference, Function is called by directly passing the reference/address of the variable as an argument. So ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ItsOKayCZ Sure, I believe you can try to use the assert I referenced above. Make sure to read through our Contributor docs, so that you end up creating a valid PR. Make sure to create your changes on a branch off your fork’s master, to keep it from getting soiled.
Actually, this is not necessary. The non-English versions of the curriculum will use the testString of the English file. We will be making some change to the overall repo that will remove everything except the
description
,instructions
, and testtext
of the non-English files. Since, those are the only parts needing translation as we will use the English file for the other sections.