Here we started the tutorial with Syntax , console and datatypes.
Most browsers come up with developer tools that allow us to,
- View the page that is rendered on the browser
- View the console tab to take input commands.
The console is a simple text interface to input commands and view output. You can reach the console by operating to the Developer Tools menu from the browser options. This comes usable for debugging.
console.log(“Hello World”); and try it out.
- The semicolon is the most reliable way to group the reports.
- Comments start with // or /* and */
The script tag takes two essential properties −
So, it is look like:
In programming, data models are a primary concept. For operating variables, it is essential to know about what is the type of variable.
Without data types, a computer cannot safely solve this:
var x = 16 + "blog";
Does it make any sense to add “blog” to sixteen? Will it produce an error, or will it give output?
- String [ “Howdy”]
- · Number [ 23, 482.038]
- · Boolean [ true, false ]
- · Null [ null value ]
- · Undefined [ value not defined ]
- · Objects
Number, String, Boolean
- Numbers are only double-precision 64-bit values. There are no integers in JS. For example – 42 or 42.39794
- · Strings are to store characters.
- · Booleans are true and false.
- Null is a sign to denote the null value.
Output of the following code:
1. What option would you specify when inserting the code script type=”____” on a web page?
2.______________ is used to display whether a value is a number or not.
3. Syntax of alert?
Ans: alert(“Hello! I am Lucine!!”);