Thursday, June 8, 2023

Javascript tips

 For an index to all my stories click this text

I like to introduce my new website: Javascript Tips

https://javascript-tips.weebly.com/

Lately I have been digging deep into Javascript. Javascript is very underestimated by many electronics hobbyists. They do not see the need for learning this language.
But Javascript is more important than you might realise.

In the ESP8266 and ESP32 world we are used to build web-servers for switching lights, displaying sensor data etc. But you can make the web-pages much more attractive by using some Javascript. I will be doing a multiple story series on this.

Then there is Javascript in your browser. In EVERY browser. For writing Javascript programs you do not need anything fancy. A simple editor like wordpad already does the trick. And then you can run your program on any computer that has a web-browser. So yes it will also work on your phone and tablet next to your PC.

Here are two examples.

https://lucvolders.github.io/htmltest01/



This site shows a gauge with a button and that gauge will display a new value each time you press the button.

https://lucvolders.github.io/htmltest02/



This site is a simple reaction test. A red dot appears on the screen and you have to point your mouse on it and click. The webpage shows at the upper left corner the best time and the last time. Before you start resize the web browsers page to a smaller size if you like. The program adjusts automatically to any screen size. It works on your phone and tablet too.

Both web-sites show how easy it is to develop programs in Javascript.

And last but not least there are web-services that can turn your Javascript program into a full blown Android App. This means that building a Javascript webpage and uploading it to a web-service (free services available) will get you a full-blown App for your phone. I will be doing some stories about this on this web-log later on.

So what's the new website about.

Well it is bringing you tips for programming in Javascript.
No complete programs but just little code snippets that make programming a lot easier. Almost every programmer runs into programming challenges like How do I :
- check for double elements in an array
- convert a CSV file to an array
- compare dates
- convert seconds to hours and minutes
- call a function with an unknown number of argusments
- activate a link on a page at a certain time
- count the amount of digits in a number
- test if objects are fully identical
- getting the numbers out of a text
- generate a password of x characters

etc. etc. etc.

At this moment there are more than 515 tips on the site and I am adding 1 each day.

So there will be hundreds of tips ???

Yes at this moment there are. At a certain point there will be no more tips added and even worse the site will vanish all together. And why is that ?? Well  I have put them all in a book. And the book contains all tips. So when the book is finished (and that might go faster as you think) and in print the website will cease to exist.

At this moment the Dutch book is already available. The English version of the book will become available shortly though Amzon and your local bookstore. It is now already available through my printers bookshop:


Click here to by the book on Amazon (and support me a bit)


So get the tips while you can and re-visit often to get more.

Javascript-tips.weebly.com.

Till next time.
Have fun.

Luc Volders