photo

Ali Q


Last seen: 5 years ago Active since 2021

Followers: 0   Following: 0

Statistics

MATLAB Answers

2 Questions
0 Answers

RANK
131,278
of 300,746

REPUTATION
0

CONTRIBUTIONS
2 Questions
0 Answers

ANSWER ACCEPTANCE
0.0%

VOTES RECEIVED
0

RANK
 of 21,068

REPUTATION
N/A

AVERAGE RATING
0.00

CONTRIBUTIONS
0 Files

DOWNLOADS
0

ALL TIME DOWNLOADS
0

RANK

of 170,775

CONTRIBUTIONS
0 Problems
0 Solutions

SCORE
0

NUMBER OF BADGES
0

CONTRIBUTIONS
0 Posts

CONTRIBUTIONS
0 Public Channels

AVERAGE RATING

CONTRIBUTIONS
0 Discussions

AVERAGE NO. OF LIKES

Feeds

View by

Question


What would be the output of the below code snippet and why ?
var x = 0; a(); function a() { var x = 2; b(); console.log(x); } function b() { x++;...

5 years ago | 1 answer | 0

1

answer

Question


Could someone please optimize this code? My code:
if (x === 0) { y = y + 2; console.log(y); } else { y = y + 3; console.log(y); }

5 years ago | 0 answers | 0

0

answers