Ved Pradhan

@vedprad1 (875) • Monta Vista High School
I like to code in JavaScript. I plan on building an Artificial Intelligent spaceship when I grow up. Oh, right. I also hate Aarf the Dog.
JS Assignment 12: Method loops and "this" keyword help!
posted to Ask by Iyehvah

In exercise one, you have to use the proper way to return the double:

function exerciseOne() {
  let mathHelpers = {
    double: function (num) {
       return num * 2;
    }
  };
  return mathHelpers;
}

In exercise two, the greeting should not be logged, it should be returned. like this:

function exerciseTwo(userObj) {
  UserObj.greeting = function () {
    return 'Hi, my name is ' + this.name;
  };
  return userObj;
}

If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!

UPDATE: WINNERS POSTPONED // ✨Check back here for our Music Hackathon results! ✨
posted to Share by katyadee

The intensity is increasing...
The wait is too hard to bear...
The insanity is rising...
Why don't you tell us, fair and square?

UPDATE: WINNERS POSTPONED // ✨Check back here for our Music Hackathon results! ✨
posted to Share by katyadee

May the best coder win...
And may that coder be me...

(Just kidding, Good Luck to everyone!)

UPDATE: WINNERS POSTPONED // ✨Check back here for our Music Hackathon results! ✨
posted to Share by katyadee

After the long wait, the day has arrived.
Our spirit and all our hopes are revived.
Of this information, we are deprived.
When will these results be contrived?

(Why am I writing lousy poetry? I don't know.)

JS Assignment 12: Method loops and "this" keyword help!
posted to Ask by Iyehvah

@Iyehvah : Could you mark my answer as correct? Thanks!

Can someone please help me solve this, am kind off stuck
posted to Ask by peeterx

@mwilki7 : That's correct. You are not supposed to console.log anything.
Make sure you read the entire instructions before starting!

Im new to coding and want to learn JavaScript and C++
posted to Ask by KoalaKing2467

If you want to learn coding, I would recommend w3schools.com. They have a great selection of lessons for many computer languages. Plus, they're all free.

You can make games with pretty much any language, but I would recommend you start with JavaScript. If you pair it up with HTML and CSS, you can start making real projects right away, without having to get in the other parts of coding.

If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!

JS Assignment 11: Intro to Objects
posted to Ask by jjaime12

Three simple mistakes.

  1. There should be no comma after the last key value pair in the object. Remove it.
  2. You need to move the closing bracket of the function at line 1 all the way to the very bottom of the code. The code needs to be inside, the function, after all.
  3. The last line of the function should be: return aboutMe;. Add it.

The final product:

function exerciseOne() {
  const aboutMe = {
    name: 'jose',
    city: 'bell gardens',
    favoriteAnimal: 'lion'
  };
  return aboutMe;
}

If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!

🌚🕶 Repl.it Site-Wide Dark Theme 🕶🌚
posted to Tutorials by mat1

@batcode @mat1 @ebest

'Neath the halo of a street lamp

How do i add a favicon?
posted to Ask by AzureScripts

Simple. Just add a forward slash (/) in front of favicon.ico.

If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!

Tutorials Challenge Results
posted to Share by timmy_i_chen

Speaking of which, I still haven't gotten any prize from the previous competition.

How do I import npm packages in repl.it javascript
posted to Ask by ChetanVenkatesh

In node.js:
1. Go to side bar on the left side.
2. Click on the second option, which is packages.
3. Type the name of the module you are in need of.
4. Click on the name when it appears in the list below.
5. Click on the plus sign.

If this answer is correct, please check the checkmark on the left side of this message. Thanks and Good Luck!

What line of code describes you best? 🤔
posted to Ask by katyadee
function main() {
  var x = 0;
}
main();
console.log(x); // Error: x is undefined

You can interpret this two ways:
1. I constantly forget about scope.
2. I think I know who I am, but then I realize I do not. (I'm undefined.)

Everyone says: "Woah!"

Multiplayer
posted to Ask by WillHolt
  1. Go to the side bar on the left side.
  2. Click on the multiplayer option.
  3. Click to start session.
  4. Copy the link.
  5. Send it to your coworker.

If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!

If you wrote the Repl.it newsletter, what would you change?
posted to Ask by katyadee

I would probably add a programming problem in every newsletter, and the first 10 people who solve it would get, like, 5 cycles.

Though I know this will never happen, because:
1. It would be such an easy way for the rich (in cycles) to get richer and the poor to get poorer.
2. Repl.it probably will not be that willing to give out cycles just like that.

Still, it would be an interesting idea to have competitive programming puzzles in the newsletter.

Also, I would remove the part of the newsletter that says that the results of the competition have been delayed. (Even though that has nothing to do with the newsletter.)

Why the "if" part does not run.
posted to Ask by stalinbabu

Remember that in any Python program, it is mandatory for you to indent appropriately for each block of code that regards functions, conditionals, or loops. This might not be the only problem, but you should attempt fixing this first.

Js: Scope and the return Statement
posted to Ask by Paultheriault

Exercise One Part One:

Line 7: console.log(school);
That means that var inFunction = 'Lambda';
Also Make sure the F is capitalized.

Exercise One Part Two:

Line 11: console.log(className);
That means that var outsideFunction = 'Intro to Web Dev';
This is because of the scope of each variable.

The other ones should be self explanatory.

If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!

What am i getting wrong?
posted to Ask by ayormeday

It seems like you have several errors that you need to fix. Let's start from the top going down.

  1. Line 5: You said person. However, that refers to a variable. You need to capitalize it to get the object: Person.prototype....

  2. Line 5: The function getInitials should not take any parameters. Change the initialization to function () {...

  3. Line 6 to Line 11: I do not really understand the things going on here. Mainly, you cannot use split on an object. I would replace this entire code with:

var initials = this.firstName.charAt(0).toUpperCase() + this.lastName.charAt(0).toUpperCase();
  1. Line 12: You are going to log the output later, so you don't need to log it now. Use a return statement instead.

That should be perfect!

If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!

please help
posted to Ask by rcockhill85

What are you specifically confused about?

so exactly how popular is repl.it
posted to Ask by TheImagin33r

First of all, you are not on the top contributor list. You cannot be on it with only 11 cycles.

Second, repl.it is more popular that you might find it. A lot of people use it all over the world. Plus, there is huge community that is creating new content and answering questions all the time. It has support in so many languages, which makes it a good choice in coding IDEs. Last but not least, it frequently holds competitions. These contests have increased Repl.it's popularity dramatically, and allow users to show off what they know.

All in all, Repl.it is very popular, and compared to its competitors, Repl.it is a really good choice.

Repl Hacker Plan and Waking Up Repls
posted to Ask by cftxp

Repls wake up on the first time it is accessed after it goes to sleep, which is about 30 minutes. The hacker plan won't do anything about this.

You should get a free acount at Uptime Robot and make it so that the server gets pinged every 25 minutes, so that the server never goes to sleep.

How to solve this problem?
posted to Ask by MdAlAminAlAmin

@MdAlAminAlAmin : You have to wrap all of the number variables in an str function, like this:

str(num)
How to solve this problem?
posted to Ask by MdAlAminAlAmin

Assuming that the code is in python, this would be your answer:

The code is simple. You just have to take a variable and return the number 1 above it and the number 1 below it. The final code would look like this:

num = int(input())
print('The next number for the number ' + str(num) + ' is ' + str(num + 1) + '.')
print('The previous number for the number ' + str(num) + ' is ' + str(num - 1) + '.')

If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!

Im new to coding and want to learn JavaScript and C++
posted to Ask by KoalaKing2467

@KoalaKing2467 : The website is free for all learning resources. The only thing you need to pay for is certification, but you probably do not need that.

How do these specs look?
posted to Ask by Zavexeon

This looks pretty good. However, I would recommend one thing. It seems that you have forgotten about OOP, like objects, classes, and instances. It probably isn't that important, but this is just a suggestion.

UPDATE: WINNERS POSTPONED // ✨Check back here for our Music Hackathon results! ✨
posted to Share by katyadee

@GrinInTheBin : I am pretty sure you can change it any time, but nobody knows if the judge already checked it, or has yet to do it. If you are willing to risk it, go for it.

JS (+HTML) - how to save (leaderboard) data - for music jam!
posted to Ask by ThomasS1

Well, you can't store data permanently on an HTML, CSS, JS repl, because that by itself is client side: Whatever is saved on that page only appears on that page, not on other pages, or on other computers.

It is easier to do this in Node.js, whicch is server side. It is actually very easy, and you don't even have to use jsonstore.io if you don't want to!

If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!

Environ - The Bridge Between Music and Code
posted to Share by vedprad1

@GrinInTheBin : You can still freely change your code with no problem.

That is one of the great advantages of submitting early. People can see that you are updating your project, and that they will think that you are actually committed to your project.

Environ - The Bridge Between Music and Code
posted to Share by vedprad1

@GrinInTheBin : The simple answer: no, but yes, too.

The old repl.it competitions used to be based off of the number of upvotes the project had, so there used to be an advantage of submitting earlier.

However, the rules have changed, and the submissions are judged not by the public, but an outside judge. In this case, there is no advantage to submitting earlier.

I would still recommend submitting earlier, though. That is because you get the advantage of others seeing your project and commenting on what was good and what you should work on. This input can be pretty valuable.

In the end, it is your choice.