www.webdeveloper.com
Results 1 to 2 of 2

Thread: Question

  1. #1
    Join Date
    Jun 2013
    Posts
    23

    Question

    Hello,

    Im learning Javascript, but i don't solve this problem. This is the code:


    var super = function(paramOne, paramTwo) {
    paramOne = paramOne + 1;
    paramOne = paramOne + 3;
    paramOne = paramOne * 8;

    return paramOne * paramTwo;
    }

    var gj = super(2,1);
    var eef = super(3,2);

    alert(gj);
    alert(eef);


    Now is my question, why dont the browser alert gj and eef?
    When i use google chrome javascript-console, its says an error of: Uncaught SyntaxError: <unknown message reserved_word>

    Could someone help me with this problem?

    Thanks!
    Reckimo

  2. #2
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,648
    'super' is a reserved word. replace it with, for example, 'func' and everything will be ok
    xxx: Guess Buddhist riddle: "What is the sound of one hand clapping?"
    yyy: facepalm

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles