Challenge fail if #data not selected with double quotes in 'geolocation' challenge
See original GitHub issueChallenge Name
https://www.freecodecamp.com/challenges/get-geolocation-data
Issue Description
Go through the challenge and do:
$('#data').html(...)
and it will fail.
change to $("#data").html(...)
and change nothing else, and it will work.
Many js developers prefer to use single-quotes in js and double quotes in html. Additionally, the other jquery challenges do not have this bug.
Browser Information
- Browser Name, Version: Chrome Stable 64bit 54.0.2840.99m
- Operating System: Windows 10 64 bit
- Mobile, Desktop, or Tablet: Desktop
Your Code
<script>
// Only change code below this line.
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function (position) {
$('#data').html('latitude: ' + position.coords.latitude + '<br>longitude: ' + position.coords.longitude);
});
}
// Only change code above this line.
</script>
<div id = "data">
<h4>You are here:</h4>
</div>
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Challenge fail if #data not selected with double quotes in ...
Challenge Name. https://www.freecodecamp.com/challenges/get-geolocation-data. Issue Description. Go through the challenge and do:.
Read more >how to avoid [Missing close double quote (") character.] error ...
I think I found a solution. When I try to upload the data to google bigquery directly it doesn't show those options in...
Read more >Escaping double quotes from source file while loading data
Solution: Double quotes present in the source file can cause data loading challenges, e.g. when a field is enclosed in double-quotes and the ......
Read more >EQL syntax reference | Elasticsearch Guide [8.5] | Elastic
Use enclosing double quotes ( " ) or three enclosing double quotes ( """ ) to escape event categories that: Contain a special...
Read more >Bulk API 2.0 and Bulk API Developer Guide
The REST-based Bulk API 2.0 provides a programmatic option to asynchronously upload, query, or delete large data sets in your Salesforce.
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 Free
Top 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
@systimotic I believe the style guide they are referencing is this: http://contribute.jquery.org/style-guide/js/#quotes
But yes, I agree we should drop the requirement as it’s not a hard rule.
Wow, thank you @abhisekp, I did not know about that! That is pretty amazing ✨ A PR resolving this issue should probably also get rid of this test. It quotes a jQuery style guide, which I have not been able to find. The entirety of the jQuery challenges seed has to be updated, as well as some of the JSON API’s and AJAX seed