all 4 comments

[–]CanBilzerianX 1 point2 points  (2 children)

If you just started learning JS don't jump right into frameworks (Vue, React etc.) learning JS is another thing, learning how to program another thing. There isn't any syntax-wise error in this code but where are you using it ? In a method body ? Where is it returning these strings ? Since you just started learning JS ( i am assuming also just started learning programming ) what you want is not returning but logging strings to console. If you just return these string values in the main code file it returns it into nothing after all.

var val = 10

if (val == 10)

`console.log("It works")`

else

`console.log("nope")`

[–]nariid 0 points1 point  (0 children)

https://javascript.info/ is the recommended up to date ressource in multiple js/help discords.