-1

I have tried to fix the issue but failed to do so. Finally posting my script here. Let me know the where the issue is

function displayNumber(myNumber) {
  console.log(myNumber);
}

​function displayCallBack(callNumber, callback) {
  callback(callNumber);    
} 

displayCallBack(30, displayNumber); 
Mike Cluck
  • 31,869
  • 13
  • 80
  • 91
Rajt
  • 1
  • 3
  • 1
    You have a weird Unicode character (`\u200b`) before your second function. Try posting your code into your dev console and you'll see it as a dot (at least in Chrome). – Mike Cluck Sep 08 '17 at 16:36
  • Welcome to stack overflow. please read the guidelines to get great answers to your questions. – catbadger Sep 08 '17 at 16:38
  • Possible duplicate of [\u200b (Zero width space) characters in my JS code. Where did they came from?](https://stackoverflow.com/q/7055600/371184) – Mike Cluck Sep 08 '17 at 16:39

1 Answers1

2

you have some whitespace characters in your code \u200b. These whitespace characters are causing your issues.

\u200b (Zero width space) characters in my JS code. Where did they come from?

Edit: Here is your code without those whitespace characters and it works fine.

function displayNumber(myNumber){
    console.log(myNumber);
}

function displayCallBack(callNumber, callback){
     callback(callNumber);
}

displayCallBack(30,displayNumber);
Zeedia
  • 1,313
  • 14
  • 20
jfarr
  • 58
  • 6