Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 24, 2023 12:06 pm GMT

10 more Javascript Challenges!

Do you know Javascript? After the success of the previous video, I've decided to make a second one with 10 more challenges to test your knowledge of the language.

These are 4 out of the 10 challenges you'll find in the video:

The ++ operator is really handy and you can put it either before or after the variable. But do you know the difference between the two?

let value = 3;console.log(value++);console.log(++value);

You can use _ and the letter e in numbers and they're still valid!

const THE_ANSWER = 1_2 + 3e1;console.log(THE_ANSWER);

Isn't the output here supposed to be 7 on both cases? Actually, none of them is 7!

const x = "5";console.log(1 + 1 + x);console.log(x + 1 + 1);

Can you spot any unintended side effect here?

let me = { name: "Leonardo", socials: { twitter: "@balastrong" } };let luca = { ...me };luca.name = "Luca";luca.socials.twitter = "@puppo92";console.log(me);console.log(luca);

If you're curious about the answers, you can find them in the video below. I hope you enjoy it!

In the video above, I go through all challenges and show the answer, but I also recorded a slower version where I actually explain them in more detail. If you're curious and want to learn more, you can find it here.

Let me know how many did you got right! :D

Thanks for reading this article, I hope you found it interesting!

I recently launched my Discord server to talk about Open Source and Web Development, feel free to join: https://discord.gg/bqwyEa6We6

Do you like my content? You might consider subscribing to my YouTube channel! It means a lot to me
You can find it here:
YouTube

Feel free to follow me to get notified when new articles are out ;)


Original Link: https://dev.to/this-is-learning/10-more-javascript-challenges-3812

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To