JavaScript code(first three lesson) - MY-NOTES

Sunday, July 12, 2020

JavaScript code(first three lesson)

From today I am starting to read js from scratch and here is the code of these 3 lessons that I learn in these lessons and me today I am happy for this.

here is the code of first lession :
 console.log("My name is "); 
console.log("Aaryan Pariyar"); 
var name = "Aryan Pariyar"; 
var age = 20; 
var collage = "Siddhanath science campus";
 // var collage = "Siddhanath science campus";
 // var collage = "Siddhanath science campus"; 
console.log("My name is " + name + " I am " + age + " years old" + " My school name is " + collage);

The output of this is 
My name is 
Aaryan Pariyar
My name is Aryan Pariyar I am 20 years old My school name is Siddhanath science campus

the second class of js is like :(variable declarations)

 var full_name = "Aaryan Pariyar";
console.log(full_name);
var course_name = "c-language";
var is_logged_in = false;
var loggedcount = 45;
var payment_mode = "e-sewa";
console.log(loggedcount);
console.log(is_logged_in);
console.log(payment_mode);

the output of this is :
Aaryan Pariyar
45
false
e-sewa



The third class is like this :(User signup )

const uid = "ar8463";
// uid = "ahf8754";
var first_name = "Aryan ";
var last_name = "pariyar";
var email = "aryan@mail.com";
var password = "123456";
var confirm_password = "123456";
var country = "Nepal";
var state = "Far-western"
var is_logged_in_from_google = false;
var is_logged_in_from_facebook = true;
var course_count = 0;
// console.log(uid);
// console.log(full_name);
// console.log(email);
// console.log(password);
// console.log("My name is " + full_name);
// console.log("My email is " + email);
// console.log(`
// with Unique ID : ${uid};
// User is : ${full_name};
// and his email is : ${email};
// and uses the password : ${password};
// `);
// interpolatataion in javascript world
console.log(`
With Unique user ID = ${uid};
 The first name of user = ${first_name};
 The last name of the user = ${last_name};
 with email = ${email};
 and his password = ${password};
 From country = ${country};
 and his state is = ${state};
 Total number of course enrolled = ${course_count};
 With login from google =${is_logged_in_from_google};
 or loggedin from facebook = ${is_logged_in_from_facebook};
 
`)
And the output of this is :
With Unique user ID = ar8463;
 The first name of user = Aryan ;
 The last name of the user = pariyar;
 with email = aryan@mail.com;
 and his password = 123456;
 From country = Nepal;
 and his state is = Far-western;
 Total number of course enrolled = 0;
 With login from google =false;
 or loggedin from facebook = true;
 

No comments:

Post a Comment