TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

JavaScript Challenges

2 pointsby varmaisalmost 11 years ago

1 comment

pedalpetealmost 11 years ago
This is interesting, but I don&#x27;t think it is a good way to learn javascript.<p>The problem for me is that many of the examples seem to intend to be tricks, and I&#x27;m not sure all of the answers are correct, given this context of trickery.<p>For example. In self invoking functions, the answer to the final question is apparently to add a bash function as &quot;!function&quot;. I&#x27;ve never seen this used before, and personally, I don&#x27;t think it makes sense from a readability standpoint. why would &quot;not function&quot; be expected to cause a function to run? I&#x27;m not suggesting it doesn&#x27;t, I&#x27;m just suggesting it maybe isn&#x27;t good practice as many other programmers may not be familiar with the syntax.<p>Then, in the Floats section, question one asks &quot;What returns calculateAmountOfStockOptions ?&quot;. To me, &quot;What returns&quot; is asking, which function or method is returning calculateAmountofStockOptions, but apparently the correct answer is the value.<p>The second question of Floats asks &quot;What is the value of calculateChange ?&quot;, and though it asks to input the number value, these questions don&#x27;t make sense. calculateChange is a function, therefore it&#x27;s value is an object, not a number.<p>I think this is too confusing in it&#x27;s current state to be a good learning too.