├── README.md ├── arithmeti.js ├── arithmetic.js ├── arithmeticc.js ├── arithmeticoperator.js ├── divide.js ├── doublequote.js ├── multiply.js ├── object.js ├── operators.js ├── plus.js ├── quote.js ├── quotes.js ├── singlequote.js ├── stringlen.js ├── sub.js └── subtract.js /README.md: -------------------------------------------------------------------------------- 1 | # JavaScript 2 | Javascript programs. 3 | 4 | -------------------------------------------------------------------------------- /arithmeti.js: -------------------------------------------------------------------------------- 1 | let x = 5; 2 | let y = 2; 3 | let z = x + y; 4 | -------------------------------------------------------------------------------- /arithmetic.js: -------------------------------------------------------------------------------- 1 | let x = a + b; 2 | -------------------------------------------------------------------------------- /arithmeticc.js: -------------------------------------------------------------------------------- 1 | let x = (100 + 50) * a; 2 | -------------------------------------------------------------------------------- /arithmeticoperator.js: -------------------------------------------------------------------------------- 1 | let x = 100 + 50; 2 | document.getElementById("demo").innerHTML = x; 3 | -------------------------------------------------------------------------------- /divide.js: -------------------------------------------------------------------------------- 1 | let x = 5; 2 | let y = 2; 3 | let z = x / y; 4 | -------------------------------------------------------------------------------- /doublequote.js: -------------------------------------------------------------------------------- 1 | let text = "We are the so-called \"Vikings\" from the north."; 2 | -------------------------------------------------------------------------------- /multiply.js: -------------------------------------------------------------------------------- 1 | let x = 5; 2 | let y = 2; 3 | let z = x * y; 4 | -------------------------------------------------------------------------------- /object.js: -------------------------------------------------------------------------------- 1 | const car = {type:"Fiat", model:"500", color:"white"}; 2 | -------------------------------------------------------------------------------- /operators.js: -------------------------------------------------------------------------------- 1 | let x = 5; 2 | let y = 2; 3 | let z = x + y; 4 | document.getElementById("demo").innerHTML = z; 5 | -------------------------------------------------------------------------------- /plus.js: -------------------------------------------------------------------------------- 1 | let x = 5; 2 | let y = 2; 3 | let z = x + y; 4 | document.getElementById("demo").innerHTML = z; 5 | -------------------------------------------------------------------------------- /quote.js: -------------------------------------------------------------------------------- 1 | let answer1 = "It's alright"; 2 | let answer2 = "He is called 'Johnny'"; 3 | let answer3 = 'He is called "Johnny"'; 4 | -------------------------------------------------------------------------------- /quotes.js: -------------------------------------------------------------------------------- 1 | let carName1 = "Volvo XC60"; // Double quotes 2 | let carName2 = 'Volvo XC60'; // Single quotes 3 | -------------------------------------------------------------------------------- /singlequote.js: -------------------------------------------------------------------------------- 1 | let text= 'It\'s alright.'; 2 | -------------------------------------------------------------------------------- /stringlen.js: -------------------------------------------------------------------------------- 1 | let text = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 2 | let length = text.length; 3 | -------------------------------------------------------------------------------- /sub.js: -------------------------------------------------------------------------------- 1 | let x = 5; 2 | let y = 2; 3 | let z = x - y; 4 | -------------------------------------------------------------------------------- /subtract.js: -------------------------------------------------------------------------------- 1 | let x = 5; 2 | let y = 2; 3 | let z = x - y; 4 | document.getElementById("demo").innerHTML = z; 5 | --------------------------------------------------------------------------------