New in tech and coding
Currently, I'm exploring [Technology/Framework] and working on [Project/Goal].
Hi Arman,
I have the chance to quickly review this exercise, and in general is all great. Just some remarks:
myFunction
, what about something like checkResponses
or something like that, a bit more informative :)myFunction();
, you don't need anything. So remove it from the definition as well.if else
statements. They work (well done!!), but you have some unnecessary code there. Some documentation here. In this case with just 2 possibilities (either is true or false), you don't need to use and else if
(that is useful when having more than 2 scenarios). But you just have 2: this or that. So a super simple if
and else
pattern is all you need. With that pattern, the second else
block will execute if the first if
condition is false, so you don't need to write the condition again making it the opposite. With a simple else
, is already defined.I'll try to explain myself better. You have done something similar to this:
if(condition === true) {
// Run this code
} else if (condition !==true) {
// Run this instead
}
It works, and that's great. But let's try to be more efficient with our code, avoiding redundant things. The block below is exactly the same as this one:
if(condition === true) {
// Run this code
} else {
// Run this instead
}
I hope I'm explaining myself clear enough ππ», and sorry if not! Let me know if you understand all this, and try to improve your code in that sense. If this is not clear enough, let me know and we can discuss it more via Slack of jitsy until is clear :)
Well done, Arman!! πͺπ»
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.