March 2018
Beginner to intermediate
514 pages
13h 11m
English
With JavaScript being a weakly typed programming language, a variable declaration is very flexible and almost impossible to get wrong.
Simply declare a variable with a var prefix without having to worry about its type—JavaScript will interpret the type depending on the value it holds:
var variable = 'Mastering Qlik Sense';//variable is a stringvar pagenumber = 1;//pagenumber is an integervar iLikeTheBook= true;//iLikeTheBook is a boolean
As you can also change the value of a variable during the execution of the code, the type automatically changes as well, without any complaints or runtime errors. Automatic type conversion is pretty convenient as it reduces the number of required declarations beforehand:
var variable = 'Mastering ...Read now
Unlock full access