🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

জাভাস্ক্রিপ্ট ভেরিয়েবল এবং ডেটা টাইপ
0 Questions
0 Views

জাভাস্ক্রিপ্ট ভেরিয়েবল এবং ডেটা টাইপ

Created by
@ClearedCanyon

Podcast Beta

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Study Notes

Variables

  • A variable is a container that holds a value.
  • In JavaScript, variables are declared using the let, const, or var keywords.
  • let and const are block-scoped, while var is function-scoped.
  • Variables can be reassigned, except for those declared with const.
  • Variables can be initialized with a value or left undefined.

Data Types

  • Primitive Data Types:
    • Number: 42 or 3.14
    • String: "hello" or 'hello'
    • Boolean: true or false
    • Null: null
    • Undefined: undefined
  • Complex Data Types:
    • Object: { key: value, ... }
    • Array: [ element, ... ]
    • Function: function() { ... }

Functions

  • A function is a block of code that can be executed multiple times.
  • Functions can take arguments and return values.
  • Functions can be declared using the function keyword or as an arrow function.
  • Functions can be assigned to variables or passed as arguments to other functions.

Conditional Statements

  • If Statement:
    • if (condition) { code }
    • Executes code if condition is true
  • If-Else Statement:
    • if (condition) { code } else { code }
    • Executes code if condition is true, otherwise executes else code
  • Switch Statement:
    • switch (expression) { case value: code; break; ... }
    • Executes code based on the value of the expression

Loops

  • For Loop:
    • for (init; condition; increment) { code }
    • Executes code repeatedly while condition is true
  • While Loop:
    • while (condition) { code }
    • Executes code repeatedly while condition is true
  • Do-While Loop:
    • do { code } while (condition)
    • Executes code at least once, then repeats while condition is true
  • For-Of Loop:
    • for (variable of iterable) { code }
    • Executes code for each element in the iterable
  • For-In Loop:
    • for (variable in object) { code }
    • Executes code for each property in the object

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Description

জাভাস্ক্রিপ্টে ভেরিয়েবল এবং ডেটা টাইপ সম্পর্কিত প্রশ্ন। এখানে ভেরিয়েবল ডিক্লারেশন, স্কোপ, ডেটা টাইপ সম্পর্কিত বিষয় নিয়ে আলোচনা করা হয়েছে。

Use Quizgecko on...
Browser
Browser