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 ??
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())
+ 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.