| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
JavaScript, often abbreviated as JS, is a programming language that conforms to the ECMAScript specification. JavaScript is high-level, often just-in-time compiled, and multi-paradigm. It has curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions. The of this repo is to save my js programs. Basics of JavaScript. Beginner level.
Most important javascript build in methods
console.log(typeof 44); // number
console.log(typeof 'something'); // string
console.log(typeof true); // boolean
let num = 12;
console.log(typeof(num)); // numberlet num = 10;
let n = num.toString();
console.log(typeof(num)); // number
console.log(typeof(n)); // stringlet str = "Hello world, welcome to the JS Universe.";
console.log(str.indexOf("welcome")); // 13
console.log(str.indexOf("wall")); // -1
const fruits = ['Orange', 'Pineapple', 'Apple', 'Melon'];
console.log(fruits.indexOf('Melon')); // 3
console.log(fruits.indexOf('klkljkh')); // -1const fruits = ['Orange', 'Pineapple', 'Apple', 'Melon'];
console.log(fruits.lastIndexOf('Melon')); // 3
console.log(fruits.lastIndexOf('klkljkh')); // -1const fruits = ['Orange', 'Pineapple', 'Apple', 'Melon'];
console.log(fruits.length); // 4
let str = "Hello world, welcome to the JS Universe.";
console.log(str.length); // 40| Back | FazBrowse Home | New Git URL |