JavaScript basics

I reviewed the basics of JavaScript.

I am still aiming to create a calendar by combining HTML and CSS.

Learned code

var firstName = 'myname';
var age = 32;
console.log(firstName + '' + ' is' + age);

var job, is front engineer;
job = 'driver';
is front engineer = false;

console.log(firstNa me + 'is a ' + age + ' year old ' + job +'.Is I front engineer? ' + is front engineer);
// Variable mutation
age = 'thirty two';
job ='office worker';

alert(firstName + 'is a ' + age + ' year old ' + job +'.Is I front engineer? ' + is front engineer);
 var lastName = prompt('What is my last name?');
 console.log(firstName + ' ' +lastName);

You can click the alert message and enter lastName for prompt.

Convert C # to JavaScript.

var seireki=0;
        var heisei=0;
        for( seireki=1989; seireki<=2017; seireki++)
        {
            Console.log("Year" + seireki + "Year");
            heisei = seireki - 1988;
            Console.log("Heisei" + heisei + "Year");

The above code may give an error. Let's examine the For, loop code.

Looking back on today

Solidify the basics of JavaScript and learn the code required to create a calendar.

Recommended Posts

JavaScript basics
Rails basics
Ruby basics
Ruby basics
Fragment basics
javascript AOP
JPA Basics 1
Docker basics
ViewPager basics
Java basics
Java basics
RSpec Basics
JPA Basics 2
Hash basics
JavaScript function
Java basics
Ruby basics
RecyclerView Basics
Rails CSV basics
Rails Routing Basics
Rails database basics
JavaScript array manipulation
Basics of Ruby
Java JAR basics
Object-oriented (Java) basics
Java and JavaScript
vim (gitbush) basics
Regular expression basics
Java concurrency basics
Rspec Basics [Rails]
Stream API basics