question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[beta] Unneccessary semicolon in "Functional Programming: Apply Functional Programming to Convert Strings to URL Slugs"

See original GitHub issue

Challenge apply-functional-programming-to-convert-strings-to-url-slugs has an issue.


// the global variable
var globalTitle = "Winter Is Coming";

// Add your code below this line
function urlSlug(title) {
  return title.trim()
          .split(' ')
          .map(word => word.toLowerCase())
          .join('-');
}; // <-- This triggers the linter
// Add your code above this line

var winterComing = urlSlug(globalTitle); // Should be "winter-is-coming"

The editor’s linter complains about an unnecessary semicolon - see the comment in the code above.

If you want to fix this, please read CONTRIBUTING.md to get started.

When you’re all set, replace this line with the following, and make your commit.

"}",

If you have any questions, please come chat with us in the Contributors Chat Room.

Happy Coding! 😄

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Quinn-Hcommented, Feb 6, 2017

Hi, @Greenheart I deleted Unnecessary semicolon and created a pull request. Thank you. And I also found the answer you wrote for this challenge isn’t right, you forgot filter() out extra space before join('-') see below:

// the global variable
var globalTitle = "Winter Is Coming";

// Add your code below this line
function urlSlug(title) {
  return title.trim()
          .split(' ')
          .map(word => word.toLowerCase())
          .filter(words => words !== '')
          .join('-');
} // <-- This triggers the linter
// Add your code above this line

var winterComing = urlSlug(globalTitle); // Should be "winter-is-coming"
1reaction
Greenheartcommented, Feb 5, 2017

@Quinn-H Sure! 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apply Functional Programming to Convert Strings to URL Slugs
In this functional programming tutorial we apply functional programming to convert strings to URL slugs. This video constitutes one part of ...
Read more >
Apply Functional Programming to Convert Strings to URL Slugs
Functional Programming (21/24) | Apply Functional Programming to Convert Strings to URL Slugs | fccjavascript,js, Apply Functional ...
Read more >
Apply Functional Programming to Convert Strings to URL ...
Apply Functional Programming to Convert Strings to URL Slugs. Solutions. Solution 1 (Click to Show/Hide)
Read more >
sitemap-questions-217.xml - Stack Overflow
https://stackoverflow.com/questions/561/how-to-use-combinations-of-sets-as- ... /1820802/how-can-i-create-function-pointers-from-a-string-input-in-matlab ...
Read more >
a non-linear personal web notebook - TiddlyWiki
This is an example of a thesis notebook powered by TiddlyWiki 5.0.8-beta. ... Create a new non-functional page control button and open the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found