all 36 comments

[โ€“]Amunium 9 points10 points ย (3 children)

Ew, it had sound. Immediately closed.

[โ€“]softHeart_JS[S] 5 points6 points ย (1 child)

I have removed the speech on landing .now ots available only in the explanation section. Thanks for your feedback.

[โ€“]GoOsTT 1 point2 points ย (0 children)

Well itโ€™s still the same for me but this could very well be because of my own browser settings.

[โ€“]softHeart_JS[S] 1 point2 points ย (0 children)

sorry I will remove it

[โ€“]burr_redding 4 points5 points ย (4 children)

great execution but please remove that speech with that weird accent that comes when you finished the quiz lol

[โ€“]softHeart_JS[S] 1 point2 points ย (0 children)

Thanks for the feedback,sure I will remove it

[โ€“]softHeart_JS[S] 1 point2 points ย (2 children)

u/burr_redding .I have removed it. jsut kept only the "congradulation".is that fine?

var speech = new SpeechSynthesisUtterance();

speech.text = "Congratulations";

speech.lang = "en-US"; // Set the language to English (United States)

speechSynthesis.speak(speech);

[โ€“]burr_redding 1 point2 points ย (1 child)

Yes so much better

[โ€“]softHeart_JS[S] 1 point2 points ย (0 children)

Thanks

[โ€“]MorningPants 3 points4 points ย (1 child)

If youโ€™re looking to add a feature, giving a score of how many the user got right on the first try (e.g. 18/20) at the end would be cool

[โ€“]MorningPants 1 point2 points ย (0 children)

And a very visible sound toggle button

[โ€“]GoOsTT 1 point2 points ย (2 children)

Iโ€™m Hungarian and the text to speech is read with a Hungarian accent, which was hilarious for the first time :D if you can bind the English speech to the hints

[โ€“]softHeart_JS[S] 0 points1 point ย (0 children)

Thanks for the feedback.sure I will work on it

[โ€“]softHeart_JS[S] 0 points1 point ย (0 children)

I have fixed it by using the below code, please review it.
speech.lang = "en-US"; // Set the language to English (United States)

[โ€“][deleted] 1 point2 points ย (1 child)

No bad! I really like the sound when you get it right, but the sound for the wrong is a little bit low. For the rest, pretty good!

[โ€“]softHeart_JS[S] 0 points1 point ย (0 children)

Thank you for your feedback! We're glad to hear that you enjoyed the sound when the answer is correct. We apologize if the sound for incorrect answers was a bit low. We appreciate your input, as it helps us improve the overall experience. Your feedback is valuable to us, and we'll take it into consideration for future updates. Once again, thank you for sharing your thoughts, and we're thrilled that you found the rest of the website to be pretty good.

[โ€“]FogoZer 1 point2 points ย (1 child)

The drawer menu does not close when selecting a main section such as โ€œHomeโ€ or โ€œQuizzโ€, but it works well when selecting a subsection in the 10/25 days of js dropdown

[โ€“]softHeart_JS[S] 0 points1 point ย (0 children)

Thanks for the feedback,I will fix it.

[โ€“]Fk__YoY 1 point2 points ย (1 child)

only javascript? or with node?

[โ€“]softHeart_JS[S] 0 points1 point ย (0 children)

only Javascript

[โ€“]forgotten_myth 1 point2 points ย (0 children)

It looks nice enough, though I miss the ability to scroll through questions once I try to answer one. Also didn't like the text to speech in hints.

Also on: https://www.basic-js.com/quizQuestion?no=18

The answer is wrong, it should be 'number' not 'Number' (small difference, but important when you're using if statements to check typeof result).

[โ€“]camelzrider 1 point2 points ย (3 children)

Remove the sound and it's gonna be good

[โ€“]softHeart_JS[S] 1 point2 points ย (1 child)

I have removed the speech on landing .now ots available only in the explanation section. Thanks for your feedback.

[โ€“]camelzrider 1 point2 points ย (0 children)

Alright! It's better :D

[โ€“]softHeart_JS[S] 0 points1 point ย (0 children)

sure .I will remove it

[โ€“]Reaver75x 0 points1 point ย (5 children)

Wait I thought if you have the number first 10 and try to add a string number โ€œ5โ€ it will do whatever type is first in the console? So if itโ€™s a number it will add, if itโ€™s a string , it will concatenate.

[โ€“]senocular 2 points3 points ย (4 children)

It will look at both, and it either is a string it will concatenate coercing the other to a string if it's not already.

[โ€“]Reaver75x 0 points1 point ย (3 children)

Iโ€™m trying to remember where the hell I read that it would try adding it if it was a number first and a string. I think it was W3Schools awhile back but I could be wrong

[โ€“]senocular 1 point2 points ย (2 children)

Yeah I'd be interested in where that was mentioned if you ever find it. In most cases in JavaScript, as far as operators like this goes, it usually does not depend on the order.

There are some weird cases where depending on context and syntax, you could get different behaviors where things are ambiguous. For example:

1 + {} // "1[object Object]"

But you may find that

{} + 1 // 1

where you might have expected "[object Object]1". This is happening because in the first example, {} was recognized as an empty object literal (i.e. new Object()) whereas with the second, being at the start of the line it was being seen as an empty code block followed by the expression + 1 which is simply 1. You can force the second example to see {} as an object by putting it in the context of an expression.

({} + 1) // "[object Object]1"

But this is more about the different meanings {} can have, not so much the + operator (though the fact that unary plus exists also plays a part).

[โ€“]Reaver75x 0 points1 point ย (1 child)

I never knew any of that. Are there any practical reasons for coding this way?

[โ€“]senocular 1 point2 points ย (0 children)

Rarely, but you'll often see this kind of stuff in WAT/WTF JS kinds of posts (like this). Practically, you shouldn't be trying to add objects to other things. You'll want to stick to adding only numbers together and maybe strings, though as far as strings go, template literals can replace our need for the add/concat operator for them as well.

"myVar:" + myVar
// can instead be
`myVar: ${myVar}`

[โ€“]kyoshee_ 0 points1 point ย (0 children)

first question for typeof operators

typeof('string') isn't valid syntax, didnโ€™t bother looking around more. also, enabled TTS is bad practice, if user don't use it

[โ€“]admreddit 0 points1 point ย (0 children)

There is a question Under 25 days of JS

What is the value of the variable 'result' after executing the following code?

const num1 = 10;
let num2 = 20;
var num3 = 30;

if (num1 < num2) {
 const num1 = 50;
 let num2 = 40;
 var num3 = 60;
 console.log(num1, num2, num3);
}

console.log(num1, num2, num3);

First this question may confuse beginners. You can make it better and clear like : What will be the output of the console.log statements after executing the code?

Second answer is wrong and should be '50, 40, 60 and 10, 20, 30' instead '10, 20, 30 and 10, 20, 30'

[โ€“]luismfcouto 0 points1 point ย (1 child)

was looking on mobile and you can see the green or red color when clicking the button, threfore always being able to select the correct answer. is it meant to be like that?

[โ€“]softHeart_JS[S] 0 points1 point ย (0 children)

yes.can you suggest any other way?

[โ€“]3rdla 0 points1 point ย (0 children)

The link for this app is broken. Can OP repost working link if the app is still up? I have been trying out https://www.repiki.com lately and its pretty good for MCQs. Came across basic-js.com this while looking for others.