JavaScript (JS)

1. Introduction to JS

var name = "hello";
var age = 19;
var field = "pentrest";
console.log(age);
console.log(name);
console.log(field);
alert(1);
confirm(1);
prompt(1);

2. Comments

console.log("Hello from JavaScript"); //in-line comment
/* this is a multi-line comment */

3. Data Types and Variables

/* Data Types: undefined, variables, null, bool, string, symbol, number, and object */
var name = "M8SZT8";
name = 8;
let ourname = "group";
const pi = 3.14;

4. Storing Variables with the Assignment Operator

5. Double Quote

6. Escape Sequences

7. Bracket Notation

8. String Immutability

9. Find Nth Character

10. Word Blanks

11. Arrays

12. Push()

13. Pop()

14. Shift() & Unshift()

15. Functions

16. Return a Value from a Function

17. If Statements

18. Comparison with the Equality Operator

19. Strict Equality Operator

20. Inequality Operator

Certainly! Let's continue with the JavaScript cheat sheet:

21. Strict Inequality Operator

22. Greater Than Operator

23. Greater Than or Equal To Operator

24. Less Than Operator

25. Less Than or Equal To Operator

26. Logical And Operator

27. Logical Or Operator

28. Else Statements

29. Else If Statements

30. Switch Statements

Certainly! Let's continue with the JavaScript cheat sheet:

31. Default Option in Switch Statements

32. Multiple Identical Options in Switch Statements

33. Returning Boolean Values from Functions

34. Return Early Pattern for Functions

35. Counting Cards

Certainly! Let's continue with the JavaScript cheat sheet:

36. Build JavaScript Objects

37. Accessing Object Properties with Dot Notation

38. Accessing Object Properties with Bracket Notation

39. Accessing Object Properties with Variables

40. Updating Object Properties

41. Add New Properties to a JavaScript Object

42. Delete Properties from a JavaScript Object

43. Using Objects for Lookups

44. Testing Objects for Properties

45. Manipulating Complex Objects

46. Accessing Nested Objects

47. Accessing Nested Arrays

48. Record Collection

49. Iterate with JavaScript While Loops

50. Iterate with JavaScript For Loops

Last updated

Was this helpful?