Javascript

Spread the love

What’s in this page?

There will be a lot of examples in javascript.

Index

 

Compare 2 arrays

With this code you can compare two arrays. If they contains the same elements the function areEqual returns true, otherwise it returns false.

If you run this code, it will return true, because arr1 and arr2 contains the same elements.

Let’s see this code into a simple real application.

In this code you can build a test in javascript, using a sort of multiple choices questions, but in a very easy way, so that you do not have to worry about the code, but just on the test.

A more complex exercize with some css

In this example, you can see which are the answers you choose:

Apporto di attrezzatura per cucina da parte del proprietario




Il conto Denaro in cassa è




A simple presentation in javascript

Output:

Use range in javascript, like in Python

If you are used to pythons range, you could be disappointed not having a same way to go through for loops with it when you write javascript code. So if it happens to write javascript and you miss range, here is the function that will replace it so that you can use it like you do in python:

A break page among elements in the page (for printing the page)

If you want to go to the next page after an element, use this

Print a page with a button in the page itself

To print a web page clicking a button do this:

Css transitions

Here is an example of fading text when the mouse is hovering it

 


Subscribe to my youtube channel

Tkinter test for students

Tkinter articles

Pygame's Platform Game

Other Pygame's posts

Utilities

Python and Powerpoint


Pdf made with Python