Students of Web Technology of class 11
Plz solve this problem of JavaScript regarding Increment Operator :
x=5;
y = x + (x++) + (x++)
Please inform me where the value gets changed... Plz help me out.....
Answers
Answered by
1
I think the value stored in y is 16 as the increment used here is postfix right.So whenever it is called,it uses the existing value but increases the value for next use....So I think it is 16.
If the increment was prefix,then the answer would have been 18...
Well I am not a student of Web Technology.....I belong to CS with C++....
But since javascript is an object oriented scripting language.....the increment which we studied is same for you guyz too
If the increment was prefix,then the answer would have been 18...
Well I am not a student of Web Technology.....I belong to CS with C++....
But since javascript is an object oriented scripting language.....the increment which we studied is same for you guyz too
Atulkrishnan:
PLZ RATE IT...
Similar questions
Geography,
8 months ago
Geography,
8 months ago
Biology,
1 year ago
Political Science,
1 year ago
Science,
1 year ago
Social Sciences,
1 year ago
English,
1 year ago