JavaScript - Assignment Operators

Veröffentlicht am: 28 Februar 2020
auf dem Kanal: EdYoda
190
2

For more courses, visit: https://www.edyoda.com/

Hey guys, in this video we will learn about Assignment Operators in JavaScript.

Practice Problems:
================
Try to answer the following questions without executing the code in codepen. Post your answers in the comment section below. Also, try to explain why do you think your answer is correct. Best of Luck!!

Q.
With x = 0, which of the following statements will produce a value of 1?

1. x++;
2. x = x + 1;
3. x += 1;

Q.
With x = 1, which of the following statements will produce a value of 0?

1. x--;
2. x = x - 1;
3. x -= 1;

Q.
What will be the result of the following statement?

var num = 100;
num += 5 * 10 / 2;

Q.
What will be the result of the following statement?

var num = 100;
num *= 2 * 10 / 5;

Q.
What will be the result of the following statement?

var num = 100;
num /= 2 * 8 - 15;


Codepen URL: https://codepen.io/qaifikhan/pen/gNOXwg

Previous Video: https://www.edyoda.com/course/1496?ep...

My Twitter Handle: @qaifikhan


Auf dieser Seite können Sie das Online-Video JavaScript - Assignment Operators mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer EdYoda 28 Februar 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 190 Mal angesehen und es wurde von 2 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!