print() is executing the ctrl+p command.
See original GitHub issueChallenge [Reverse a String](https://www.freecodecamp.com/challenges/reverse-a-string# has an issue. My code:
function reverseString(str) {
**print("anythin");**
}
reverseString("hello");
Issue: The above code is executing the ctrl+p command. Or even if I am just typing print(); anywhere is the text editor. it is reproducing the same error. I am attaching the screenshot
To reproduce the issue: Execute the above code. or just type print() in editor and execute it.
This issue is not limited to this problem only but it is reproducible at any problem.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
How to click CTRL+P using Java and selenium web driver?
If you are trying to print, this is working for me ((JavascriptExecutor) driver).executeScript("print()");.
Read more >What Does Ctrl+P Do? - Computer Hope
On Apple computers, the keyboard shortcut for print is Command + P . How to use the Ctrl+P keyboard shortcut. Ctrl+P in an...
Read more >ctrlp.vim ÷ home
Open multiple files at once. Create new files and directories. Execute Ex commands on an opening file (jump to a line, to a...
Read more >How to print from a Windows computer (Ctrl + P) - Digital Citizen
Contents · 1. Press CTRL + P on your keyboard to print on Windows · 2. How to print on a Windows PC...
Read more >PSA: If you're using CtrlP use this maintained fork : r/vim - Reddit
fh: search command history and execute. ... -prune -o -type d -print 2> /dev/null | fzf +m) && cd "$dir" } fh() {...
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
Hi @arthuragnar! Thank you for reporting this issue.
As you’re coming from Python, I can understand why you used
print()
. However, as described in the MDN page linked earlier, opening the print dialog is the correct behaviour when theprint()
function is called in Javascript. Therefore, I believe your code does what it should do, and this is not a bug with freeCodeCamp.As this is not a bug with freeCodeCamp, I’m closing this issue. Again, thank you for reporting this issue, bug reports help us make freeCodeCamp better. Happy coding!
This seems like a deep edge case. I think bike shedding imho.