DEV Community

Cover image for Edabit challenge 1 | strings | very easy | how edabit works?
codeWithNithin
codeWithNithin

Posted on

Edabit challenge 1 | strings | very easy | how edabit works?

This is an introduction to how challenges on Edabit work. In the Code tab above you'll see a starter function that looks like this:

function hello() {

}

All you have to do is type return "hello edabit.com" between the curly braces { } and then click the Check button. If you did this correctly, the button will turn red and say SUBMIT FINAL. Click it and see what happens.

solutions

// solution 1:
function hello() {
  return "hello edabit.com";
}

// solution 2
function hello() {
  let msg = "hello edabit.com";
  return msg;
}

// solution 3
const hello = () => "hello edabit.com";

// conclusion
// 1. always write very less number of code
// 2. use solution 1 or solution 3 to solve this type of problems
Enter fullscreen mode Exit fullscreen mode

Top comments (0)