Javascript – Data types and numbers

Javascript – Data types and numbers

Javascript has primitive types and objects primitive types: number 1, 5, 66 string ‘Hello’ “World” boolean true false null undefined objects: anything else than primitive types Remember that Javascript is a weakly typed language and you cannot declare the type of the variable. You can use the typeof operator to the find the type of a variable. numbers The numbers can be: integer 10, 6, 536363 signed integer -22 decimal 2.3 , -300.12 scientific notation 1e1, 2e+3 octal 017 hexadecimal 0xF1 NaN not a number Number operators Javascript has binary…

Javascript – Data types and numbers Read More

Javascript – Introduction and variables

Javascript – Introduction and variables

Javascript born in 1995 and initially inspired from Java. Is the only language you can run in a web browser and gives interactivity to the HTML documents. Javascript can also run outside the web browser on a nodeJS interpreter for example. Javascript is an interpreted language and compiled just-in-time which means that the code is converted just before runtime. With Javascript, you can change the CSS and HTML code, use geolocation and even work with data using Ajax. You can put your Javascript code: inside the HTML in a local…

Javascript – Introduction and variables Read More