Master Javascript Fundamentals with 50 free flashcards. Study using spaced repetition and focus mode for effective learning in Programming.
JavaScript is a high-level, interpreted programming language primarily used for web development to make web pages interactive. It is the scripting language of the Web, supported by all modern browsers, and follows the ECMAScript specification.
JavaScript was created by Brendan Eich in 1995 while working at Netscape. It was initially called Mocha, then LiveScript, before being renamed JavaScript.
ECMAScript (ES) is the standardized scripting language specification upon which JavaScript is based. The latest stable version is ES2023, with JavaScript implementing all ES features plus browser-specific ones.
Use the <script> tag in the HTML, either inline with code between tags or externally via <script src="script.js"></script>. Place it before the closing </body> tag for better performance.
console.log() outputs a message to the browser's console for debugging and logging. It can log multiple arguments of any type, like console.log('Hello', 42);.
Variables can be declared using var (function-scoped), let (block-scoped), or const (block-scoped constant). let and const were introduced in ES6.
The primitive types are string, number, bigint, boolean, undefined, null, and symbol. They are immutable basic values.
Use the typeof operator, e.g., typeof 'hello' returns 'string'. It returns a string describing the type.
null represents an intentional absence of value, while undefined means a variable has been declared but not assigned. typeof null is 'object', a historical bug.
Type coercion is JavaScript's automatic conversion of values between types, like '5' + 1 becoming '51'. Use === for strict equality to avoid it.
Arithmetic operators include + (addition), - (subtraction), * (multiplication), / (division), % (modulus), ** (exponentiation). They work on numbers.
Comparison operators like ==, ===, !=, !==, >, etc., return a boolean (true or false). === checks value and type.
Flashcards
Flip to reveal
Focus Mode
Spaced repetition
Multiple Choice
Test your knowledge
Type Answer
Active recall
Learn Mode
Multi-round mastery
Match Game
Memory challenge