flipper-zero-tutorials/js/intro
Derek Jamison de3e8f323d Intro JS
2024-03-30 20:45:39 -05:00
..
a_js_intro.js Intro JS 2024-03-30 20:45:39 -05:00
README.md Intro JS 2024-03-30 20:45:39 -05:00
widget-js.fxbm Intro JS 2024-03-30 20:45:39 -05:00
widget.js Intro JS 2024-03-30 20:45:39 -05:00

JavaScript intro

Introduction

I created an introduction to JavaScript video at https://youtu.be/33Xmn5rnisc.

In the video I walked thru the a_js_intro.js file.

The a_js_intro.js script ends up covering a lot of topics!

  • submenu : setHeader, addItem, show
  • keyboard : text (first param is # of bytes to allocate, including null terminator)
  • storage : exists
  • usbdisk : start, wasEjected, stop
  • textbox : setConfig, emptyText, addText, show, isOpen
  • gpio : init, read
  • badusb : setup, isConnected, press, println, quit
  • subghz : transmitFile
  • let, = (assignment), for (loop)
  • require, print, delay, parse_int, __dirpath
  • Strings, numbers, booleans
  • Arrays, .length
  • + (adding), i++ (increment by 1), ! (not)
  • if, else if, === (compare equal), !== (compare not equal)
  • calling functions, defining functions, return

At the end of the video I ran widget.js to summarize what we learned.