Help with some javascript.


Help with some javascript.

var a=10, b=5, c=0; var msg = document.querySelector('p'); c = a/2; if (b === c) msg.textContent = "Door number 1"; else msg.textContent = "Door number 2"; msg.textContent = "Door number 3"; 

It states the var c=0 and then two lines down that c=a/2 which is 5. So which one is it and why?

Thanks for help!

Submitted July 17, 2017 at 09:36PM by PhotoShopNewb
via reddit http://ift.tt/2urih0h

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s