json variable printing to console

Hi,

I went to below URL

http://jsfiddle.net/

I wrote below JSON code


var customerOrd={"name":"john","phone":"111","products":["card","milk"]}
console.log(customerOrd.name);



I click 'Run' at top right hand side button. To see the variable john printed to console i could not see console option. Some reason top options like File, Edit, Window(underwhich console should be there), Help etc missing.

Please advise how to see console and then john within console.
jsonEditor.png
LVL 7
gudii9Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tom BeckCommented:
Try pressing the "Alt" key to display the Menubar.

Of course with IE you can always press F12 to bring up the Developer Tools and from there click the console tab.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Carl TawnSystems and Integration DeveloperCommented:
As far as I know you can't log to the console from JSFiddle. Just use alert() or document.write() instead (The doc says JSFiddle doesn't support document.write(), but it worked for me using your sample code).
0
Alexandre SimõesManager / Technology SpecialistCommented:
The console comes in the dev tools of your browser.

You're using Chrome so just press F12 and select the Concole tab.
Your value will be there.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tom BeckCommented:
You can print to the console in jsfiddle. JsFiddle has no control over that.

Chrome? That's Internet Explorer, correct?
0
Carl TawnSystems and Integration DeveloperCommented:
I didn't mean you can't write to your own console from JSFiddle, I meant that JSFiddle doesn't have a window to capture console output!
0
Alexandre SimõesManager / Technology SpecialistCommented:
From the screenshot looks like Chrome but the key is the same anyway :)
0
gudii9Author Commented:
i saw one video tutorial where jfiddle has at the top options like
File
Edit
Window--->under this they clicked option called 'Console'

when they ran
var customerOrd={"name":"john","phone":"111","products":["card","milk"]}
console.log(customerOrd.name);

console showed john
0
mccarlIT Business Systems Analyst / Software DeveloperCommented:
i saw one video tutorial where jfiddle has at the top options like
File
Edit
Window--->under this they clicked option called 'Console'

It sounds like you were seeing the BROWSER menu options, nothing to do with jsfiddle. I'm not sure which browser that would have been though. Post a link to the video tutorial and we can confirm. But as others have already said, press F12 and go to the console tab will be doing the same thing in YOUR browser as happened in the video tutorial browser.
0
gudii9Author Commented:
Does the browser console(which opened by pressing F12) shows jason out put of above program which is

john

Please advise
0
Alexandre SimõesManager / Technology SpecialistCommented:
Of course it does.
Did you try it?

Give it a try here: http://jsfiddle.net/AlexCode/3j7096og/
0
Alexandre SimõesManager / Technology SpecialistCommented:
Mate, apart from this particular problem here, I believe you're missing some serious JavaScript foundations.

I advise you to take some rump-up online training.
Have a look at PluralSight's JavaScript courses, it's a really nice place to start.
0
gudii9Author Commented:
F12 showed console in chrome too and displayed output 'john'.

Have a look at PluralSight's JavaScript courses, it's a really nice place to start.

i will definitely explore and learn from this site. Is it is free site or do i have to pay. I will explore on it later when i have access.
console.png
0
Alexandre SimõesManager / Technology SpecialistCommented:
It's payed but worths every cent.

Cheers!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JSON

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.