Web encryption and hashing in javascript with the crypto api

Web encryption and hashing in javascript with the crypto api banner image

A while ago it was announced that a crypto api will be released for javascript. Meaning it will be possible to do real encrypting and decrypting, and generating hashes directly in the web browser. Now it's actually possible! It should be noted though that even if the api is a candidate recommendation, the browser support..

How to better check data types in javascript

How to better check data types in javascript banner image

To check what data type something has in javascript is not always the easiest. The language itself provides an operator called typeof for that which works in a straightforward way. Typeof returns a string of what a values data type is, so for an object "object" is returned and for a string "string". However javascripts..

RequestAnimationFrame for better animations in javascript

RequestAnimationFrame is a function in javascript which is used to create animations directly in the browser. Javascript has been used for doing animations for a long time, and it's pretty awesome what things really can be done with the language. For simpler stuff though as animated hover effects when someone hovers their mouse cursor over..

Loops in javascript

Loops in javascript are something very useful and which are used all the time. They're not specific just for javascript, rather they can be found in almost all programming languages in the world. Loops are one of the most fundamental building blocks in programming, and some argument that all you really need to create a..

Strings in javascript and their properties and methods

Strings in javascript This chapter is about strings in javascript. What a string is, is a sequence of characters like letters, numbers, symbols and spaces for instance to represent some kind of text. It's a data type that's used all the time for all sorts of things, and isn't unique for just javascript in any..

Numbers and operators in javascript

Numbers In many programming languages working with numbers can be quite complicated. There are actually many different data types that needs to be remembered and set for each of the programs numbers. For instance integers must be declared with int, floating numbers with float. And then there's smallint, tinyint, double etc. A variable holding an..

How statements and comments in javascript looks and work

Statements In javascript statements are simply the lines of code that's been written into a script and that gets executed by the web browser. It works the same way like in most other programming languages, meaning statements are just different lines of commands and instructions for things you want the computer to do. For example..