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..
Tag Archives: Javascript
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..
When this article is written localstorage in javascript isn't anything new. It's been available since html5 rolled out on the web, and is simply a way of storing user data between page views. Cookies in javascript As most people know, nothing in javascript is saved when a user reloads a page or navigates to another…
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..
It was a great many years ago ECMAScript 5 came out to javascript now, and brought not only lots of exciting news, but also a great deal of new array methods. Methods that does everything from looping through, changing, filtering and extracting values from them. Below is a list over all the array methods that..
Switch is a statement in javascript that's used to control the data flow in programs. With other words to be able to decide what should happen from different cases or actions. Basically the same way one does with if and else, which most people probably are familiar with by now. They work in similar ways..
An array in javascript is something that could be described as a list of values. Until now we've only talked about single values like strings and numbers that can be stored into variables. But sometimes you want to be able to store multiple values in the same place, like in a variable. For example if..
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..
Introduction to time and date It's probably not a surprise that you can work with dates and times in javascript. There's an object built in for that which is used all the time in all sorts of projects. Often to be able to set a date for when something has happened or will happen. For..
Null and undefined are two data types in javascript that are a bit special and different from each other. Most programming languages only have null, but in javascript there's also undefined which is similar to null, but not exactly the same. They both are a bit similar to the boolean false. All three are falsy..
What if and else is The statements if and else in javascript means exactly what they sound like, if something is true do this, or else do something else. Both these statements are used very often in the language in order to control programs data flow. Often when coding you want to be able to..
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..
Expressions In javascript there's something one should know about before learning about booleans. That's expressions which is sort of a collection name for all types of code that results in a value. For example the statement x = 5; is an expression. What happens when the variable x is assigned the value is that first..
What a variable is Now we're going to talk about one of the most important and fundamental concepts in javascript (and also in other programming languages). Variables. A variable can be thought of as a placeholder for a value. Like a shopping bag that contains perhaps an apple or a banana. You use the bag..
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..
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..
Welcome to the first course in learning javascript! You've made a good choice coming here since javascript is one of the most popular programming languages in the world today. It's used everywhere and not only on websites, but also in windows 10 and in mobile apps. For every web developer today it's a language one..