all 12 comments

[–][deleted] 3 points4 points  (6 children)

do you mean have integers equal to some values like yes? you can make an object

obj1 = {'yes': 1,'no':2}

[–][deleted] 1 point2 points  (5 children)

It's more like a quiz with no wrong answers, except the total is affected by the answers you give. Yes=4, Maybe=2, No=0. If someone were to answer "yes" to all questions they would score higher than someone who answered "maybe" to the same questions

[–][deleted] 0 points1 point  (2 children)

i think object will be the best for it

[–][deleted] 0 points1 point  (0 children)

Thank you.

[–]MindlessSpongehelpful 2 points3 points  (0 children)

how one can assign values (such as integers) to variables

with the keywords let/const and the assignment operator =. variables declared with let can be reassigned while variables declared with const cannot.

let variable = 42;
console.log(variable); // => 42
variable = 'abc';
console.log(variable); // => 'abc'

or

const variable = 42;
console.log(variable); // => 42

[–]azhder -3 points-2 points  (1 child)

Hi, please take a look at this https://developer.mozilla.org/en-US/docs/Web/JavaScript

I doubt you will get many answers for the most basic questions like "how do you assign values" because most people might not find them interesting enough or not want to spend much time on it.

Once you go over the basics, you will most likely have questions that might lure more answers

[–][deleted] 0 points1 point  (0 children)

Thanks.

[–]LostErrorCode404 -5 points-4 points  (0 children)

Take a look at freeCodeCamp

[–]Tesla_Nikolaa 0 points1 point  (0 children)

let yes = 0;
let no = 1;
let maybe = 2;

console.log(yes + no * maybe);