Menu

Javascript granulas

One aspect i experienced... when trying out Javascript as a new language of Fun(tm) was .. that it actually was a moreof a WTF experience. Thought that was simply my own stupidity.. But now im rather convinced that i just stumbled upon those countless strange effects in js, when writing code with that one.... Just note an interesting read here, in case there are devs, whose experiencing the same WTF1 WTF2 as me and act some kind of frustrated when asked about "youKnowWhichLang". Just read following snippet and make up your mind....

function laugh()
{
  return
  {
    haha: "ha!"
  };
}
laugh();
// returns undefined

function laugh() {
  return { haha: "ha!" };
}
laugh();
// returns Object: { haha: "ha!" }

https://gist.github.com/yeco/308492

Been through half of those janitorials i talked about previously. thinking about divin some rounds in the void of my creativity now, to gather some strenght and ideas... cya!

Posted by Thorsten Kani 2016-08-12

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.