2 - JavaScript Variables | JavaScript Tutorial for Beginners

Pubblicato il: 28 maggio 2020
sul canale di: GoPHP
1,129
24

How do you add JavaScript to your page?
By using script tag.

Script tags can be placed in the body, or in the head section of an HTML page, or in both.

JavaScript output statements:
innerHTML | document.write() | window.alert() or alert() | console.log()

JavaScript Variables:
By using var keyword, we can declare variables.
A JavaScript variable can hold any type of data like numbers, strings, boolean etc..

Variable name declaration rules:
Names Contain letters, digits, underscores, and dollar signs.
Names must begin with a letter
Names can also begin with $ and _ (but we will not use it in this tutorial)
Names are case sensitive.
Reserved words (like JavaScript keywords) cannot be used as names

examples of valid variables
var institute = 'Gophp';
var city = 'Hyderabad';
var pincode = 500038
var price = 789.58;
var status = true;


In questa pagina del sito puoi guardare il video online 2 - JavaScript Variables | JavaScript Tutorial for Beginners della durata di ore minuti seconda in buona qualità , che l'utente ha caricato GoPHP 28 maggio 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 1,129 volte e gli è piaciuto 24 spettatori. Buona visione!