DEV Community

Oleksandr Ovoroshylo
Oleksandr Ovoroshylo

Posted on

You may feel vague about why you love JavaScript the most

I understand that learning things can be daunting, whether it’s a new skill, office, or people.
Just like how Javascript objects can dynamically have new properties added at runtime, humans can learn through practical application, even when faced with completely new tasks. I learned web development in the same way that many of you are learning it now.

In the world of Object-Oriented Programming (OOP), many languages like Java and C++ require all object properties to be defined upfront. But Javascript breaks the mold by allowing for the addition of properties during runtime.
Consciously or not, it is doing that smartly.

So why does it seem to be one of the most compelling parts to you?

As the human, you would potentially be rather dynamic when you come across a new challenge. And part of you can absorb new knowledge through hands-on experience, adapting and growing in real-time.

So please try thinking carefully why the following pseudo-code should be written in repetitive, clunky way.

`...

const yourFeelings = you.face(new Challenge()) // Your status changes to 'inactive'
...

if (you.businessRole === 'fullstack Js developer' && yourFeelings === 'complicated') {
await you.think(JavaScript)

await you.makeMoney('content writing', 'Medium.com')
console.log(you)
}

else if (you.businessRole === '.NET developer' && yourFeelings === 'complicated') {
await you.think(JavaScript) // You also keep thinking about JavaScript, which makes the code look cluttered.
await you.makeMoney('IT consultation', 'Upwork.com')
console.log(you)
}
...`

Honestly, I wrote this clunky piece to encourage every single developer to re-think the power of JavaScript and to bring them cheerfulness.
Another thing to note is how your object’s properties dynamically change depending on your ways of making money, the platform you are getting on, your skillsets, and many more, resulting in variations in the output object structure.

So yes, here’s the output:

`Object: {
name: "John Doe",
age: "30",
businessRole: "fullstack Js developer",
...
status : 'happy',
blogs: [blob],
drafts: [blob],
upvotes: 122,
savings: 3000,
followers: [],
followings: [],
...
}

Object: {
name: "Frank Dude",
age: "24",
businessRole: ".NET developer",
...
status : 'happy',
activeContracts: [],
jobsOnSuccess: 15,
submittedProposals: 21,
savings: 5000,
reviews: 38,
...
}`

If you’re a developer, and feeling overwhelmed by a new challenge, remember: just like a Javascript object, you have the power to dynamically add to your own skillset through trial and error. Trust in your ability to learn and evolve, and after all, as a human, figure out what seems to be much greater than what a JavaScript object is involved in growth at runtime, you’ll be an unstoppable force during your long run of tech world.

Top comments (0)