JavaScript for WordPress Forums Vanilla JavaScript 1.2 quiz #2: Which of the following is NOT a type of operator in JavaScript?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6848
    Paul
    Participant

    I found this question to be pretty confusing, given the available answers: Arithmetic, String, Conditional and Symbol.

    I was thinking JS operator types are the ones described here:
    + Addition
    – Subtraction
    * Multiplication
    / Division
    % Modulus
    ++ Increment
    — Decrement

    With that in mind, I thought surely “arithmetic” must be an operator type, and “string” really doesn’t seem to fit the bill. Neither do the others. So I guessed “string”, which was wrong. Next, I thought maybe I should be looking for ‘types’ and forget ‘operators’, and types would include numbers, strings and symbols, so I guessed “conditional” as not being a type, but that was also incorrect.

    I know I must be misunderstanding the question. Could anyone explain where I went wrong?

    #6980
    Zac Gordon
    Keymaster

    Hi Paul!

    Please check out the list of JS Operators that I link to in the video notes: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators

    Technically Symbols are a Data Type.

    Hope that helps!

    Zac

    #7882
    Paul
    Participant

    @zac, I do understand that a lot better now. Thanks for clarifying.

    It’s a little confusing since strings are also data types, and conditionals are conditionals… the fact that both are also operator types wasn’t immediately clear to me until I checked the link, and now it makes perfect sense.

    #7897
    Zac Gordon
    Keymaster

    Hey Paul!

    Glad that clears things up a bit 🙂 there is definitely some overlapping terminology, so if you have suggestions on how to keep the heart of the question but clarify the possible answers or the question wording, I would definitely appreciate the feedback!

    Cheers 🙂
    Zac

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.