Task #1067 - Palindrome
Implement a function isPalindrome that checks if the string is a palindrome A palindrome is a string that reads the same way even if reverted. isPalindrome(‘abba’) // true isPalindrome(‘baba’ // false...
Implement a function isPalindrome that checks if the string is a palindrome A palindrome is a string that reads the same way even if reverted. isPalindrome(‘abba’) // true isPalindrome(‘baba’ // false...
Implement a function revertMe that reverts a string. This task is part of the Full-Stack JavaScript Course If you have any issues with it, you can ask for community help below the post...
Implement the function formatNumber. It’s essentially the same function that you’ve implemented in the end of the Gold Mine game. The difference is that here we want to handle really large numbers....
We’ll implement the backend that will serve the config for the gold mining game. Our backend will be built on Express.js, so let’s install it with npm install --save express first....
On this stage, let’s fill all the remaining fields at once. chitChat array is used to display messages in a sort of ‘news ticker’: message: a message that will be pushed to the ticker when the condition is met condition: an object that defines the condition when the message should start displaying in the ticker....
WOW! That’s an awesome job! The CONFIG is ready! Now we’ll add a logger middleware to our express server to see which requests are coming in. Install the npm module morgan and use it according to the instructions...
Now, we need to import server from server.js and startServer from functions.js into index.js and actually start a server! You can start it on any free port, but I suggest using port 8080 for us to be on the same page...
Let’s add our first route to the server to be able to test it. In server.js, right below the comment add the GET /check route. The payload served on this route should be { version: '0....
Follow up with creating the object that we will serve as a config to our Mining Empire app Create the file constants.js and export the object CONFIG from it You can take a look at the example on https://v2....
Now that we have the CONFIG constant, we can import it into server.js and add a new route GET /config that will serve it. Implement this route and make sure it works by going to http://localhost:8080/config in the browser...