0

Something in function in java script

when i declare a name to function this is an error that the name is defined but never use . can any one help me ??

17th Sep 2018, 2:01 PM
Mostafa Noshy
2 ответов
+ 4
Where are you running the code? + your code. It must be warning from your IDE or lint program. Javascript doesn't throw any error for not using a function or variable. //example code, run in codeplayground 'use strict';function hi(){return 'hi'}; hi; hi(); function hi(){return 'hi no'}; hi() console.log("online") console.log(hi())
17th Sep 2018, 2:29 PM
Lord Krishna
Lord Krishna - avatar
+ 2
My guess is you’re missing a function call but, because you haven’t shown your code, this is only a guess. Functions should work like this: function myFunction () { /// some function statements return myFunction () /// I think you are missing this part.
17th Sep 2018, 2:21 PM
Russ
Russ - avatar