Best way to learn JavaScript?

Posted on
  • Hi - I have a bit of coding experience in Python using RaspberryPi and Adafruit boards but want to learn JavaScript and see espruino as a great way to do that. But I’d also like to gain broader understanding of JavaScript, does anyone have a particular online course or book to recommend?

  • Hi, that's a though question, as I started a long time ago. But still find MDN docs as a great source / reference. The search is really useful, and there is a JS basics section on their site. As far as I have seen most new JS content focuses on a particular framework...

    Also for trying out any random snippet of JS code, you can use just any browser console on just any computer.
    And you can run Espruino interpreter in Linux, if you build it yourself, so you can experiment with code without an actual device

  • I should add about trying Espruino out, you can do it using the online Bangle.js emulator and it could be a fun way to play: https://www.espruino.com/ide/emulator.ht­ml

    I do have a book, called 'Making Things Smart'

    It covers making a few simple hardware projects with JavaScript - it doesn't cover JS in great detail, or the hardware in great detail, but it could be a fun way to get to grips with the hardware.

    I have also heard a lot about 'JavaScript: The Good Parts', but I haven't read it.

    However honestly, there should be a bunch of material online without needing a book (including tutorials on espruino.com) but I'm afraid I don't have any specific links

  • Thanks both for your advice. I’ll look those up and also just start a couple of the tutorials on espruino.
    And if I may - a big thanks to you Gordon for setting this all up. It’s a great opportunity for hobbyists like me. You had a mention in last issue of Hackspace magazine which inspired me to look up espruino.

  • @user118103,

    the Espruino http://www.espruino.com/Bangle.js emulator https://www.espruino.com/ide/emulator.ht­ml is really a great tool to get you going: you have 5 input buttons and a 240x240 pixel color display which give you a powerful UI infrastructure, and the blinking of LEDs - the typical Espruino red LED1 and green LED2 - is emulated as red and green 'fat' dots. And the best of it: it is all integrated into the IDE, including the console, which allows to query (and modify) just everything (even) while the code is running.

    When it though comes to IoT - measuring things, controlling things and communicating - you have to get an Espruino device. The most suitable devices are the http://www.espruino.com/Pixl.js or https://www.espruino.com/WiFi. Pixl.js has a ui - display and buttons - and can communicates with Bluetooth. Espruino-WiFi can securely - https - communicate via wireless local area network with the WWW. You can also setup it up an access point to run its own wifi lan. Running a Web server - all part of the Espruino ecology - and writing a simple Web application gives you a UI in a browser.

    Having Python experience helps you for sure with JavaScript programing. Things may be called a bit different - for example ...require("moduleNameX") compares to import moduleName, but many concepts come from their 'ancestries'.

    @AkosLukacs mentioned Mozilla Developer Network https://developer.mozilla.org/en-US/docs­/Web/JavaScript. It is the the reference source. More often I though got to W3Schools https://www.w3schools.com/js/default.asp­ which includes many ready to run examples in integrated edit and run environment that you can run as is - without copy paste - and modify to explore more.

  • Thanks! As @AkosLukacs and @allObjects mentioned, MDN is an amazing JavaScript reference - it describes the APIs really clearly, but also gives examples of use and also of some of the slight quirks.

    It looks like it's got some tutorials in there too which look good as long as you're happy to gloss over the bits where they access the webpage from JS (which obviously don't apply to Espruino).

    You had a mention in last issue of Hackspace magazine

    That's really cool. I had no idea - Issue 35? https://hackspace.raspberrypi.org/issues­/35

  • In #34 Smartibot is mentioned https://hackspace.raspberrypi.org/issues­/34
    Their blimp demo video is pretty cool: https://thecraftyrobot.net/blogs/project­s/making-a-blimp-that-actually-flies And taking a look at their site again: The newer demos look fun too!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Best way to learn JavaScript?

Posted by Avatar for user118103 @user118103

Actions