Interactive Programming Forums
Login
Register
Home
Questions/Snippets/Exercises
Unanswered
Tags
Ask a Question
Post a Code Snippet
Post an Exercise
Welcome to Interactive Programming Forums, where you can ask questions, receive answers from other members of the community, post code snippets and post exercies.
All categories
Ruby
(3)
Python
(10)
PHP
(7)
Perl
(2)
SQL
(8)
Javascript
(6)
HTML
(20)
CSS
(4)
jQuery
(0)
XML
(3)
Code Snippets
(1)
Exercises
(4)
Other
(9)
I cannot get Ques 7 in the JavaScript Function Tutorial to work? Help!
+7
votes
Javascript Object Notation
Examine and try out the following code:var freesvs = {s1: "IPv6 certification",s2: "Tunnelbroker",s3: "DNS", arr:['ipv6.he.net', 'tunnelbroker.net', 'dns.he.net'],fn: function() {document.write('This is a function()');}}freesvs.s1;
How can this be fixed?
posted
12 years
ago
in
Javascript
by
Heidi Vincent
(
3,970
points)
1 Answer
+1
vote
Hi,
If you post the actual exercise and the result, it would be easier for me to diagnose your issue.
I've tried the same code and got the below result:
Code I ran:
var freesvs = {
s1: "IPv6 certification",
s2: "Tunnelbroker",
s3: "DNS",
arr:['ipv6.he.net', 'tunnelbroker.net', 'dns.he.net'],
fn: function() {document.write('This is a function()');}
}
freesvs.s1;
Result:
IPv6 certification
Is your result different from mine?
answered
12 years
ago
by
codeadmin
(
113,880
points)
Thaks for your response but the result I get is:
Error: Expected ';'
And here is the Exercise in its entirety:
Javascript Object NotationExamine and try out the following code:var freesvs = {s1: "IPv6 certification",s2: "Tunnelbroker",s3: "DNS", arr:['ipv6.he.net', 'tunnelbroker.net', 'dns.he.net'],fn: function() {document.write('This is a function()');}}freesvs.s1;
Related questions
–5
votes
1
answer
header() function doesn't work on web server but used to work in local laptop.
posted
12 years
ago
in
PHP
by
Bunny Thuta
(
1,200
points)
+4
votes
1
answer
in html on the second exercises im struggeling to create a 2 x 4 table can some one help
posted
12 years
ago
in
HTML
by
Matthew Tembo
(
6,610
points)
+9
votes
1
answer
I need to restart all the exercises of Tutorial III.
posted
12 years
ago
in
HTML
by
atimokoena
(
1,400
points)
programming
+6
votes
1
answer
What is wrong in this JavaScript code?
posted
12 years
ago
in
Javascript
by
Heidi Vincent
(
3,970
points)
+8
votes
1
answer
there is a bug with RegExp exam in Javascript
posted
12 years
ago
in
Javascript
by
manlink2000
(
5,280
points)