Skip to content

Commit

Permalink
Merge pull request #71 from sidharth-23/master
Browse files Browse the repository at this point in the history
Variables
  • Loading branch information
siddiqkaithodu authored Dec 26, 2023
2 parents f2dbeac + ebe377e commit 41982a9
Show file tree
Hide file tree
Showing 5 changed files with 161 additions and 138 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
In the code below, each line corresponds to the item in the task list.

```js run
let admin, name; // can declare two variables at once
let admin, name; // ഒരേസമയം രണ്ട് വേരിയബിളുകൾ പ്രഖ്യാപിക്കാൻ കഴിയും

name = "John";

Expand Down
13 changes: 8 additions & 5 deletions 1-js/02-first-steps/04-variables/1-hello-variables/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ importance: 2

---

# Working with variables
# വേരിയബിളുകൾക്കൊപ്പം പ്രവർത്തനം


1. രണ്ട് വേരിയബിളുകൾ പ്രഖ്യാപിക്കുക: `admin` നും `name`.
2. വാലൃു നിയോഗിക്കുക `"John"` to `name`.
3. `name` ഇൽ നിന്ന് `admin` ഇലേക്ക് വാലൃു പകർത്തുക.
4. `alert` ഉപയോഗിച്ച് `അഡ്മിൻ` വാലൃു കാണിക്കുക ("John" ഔട്ട്‌പുട്ട് ചെയ്യണം).


1. Declare two variables: `admin` and `name`.
2. Assign the value `"John"` to `name`.
3. Copy the value from `name` to `admin`.
4. Show the value of `admin` using `alert` (must output "John").
16 changes: 8 additions & 8 deletions 1-js/02-first-steps/04-variables/2-declare-variables/solution.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
## The variable for our planet
## നമ്മുടെ ഗ്രഹത്തിനായുള്ള വേരിയബിൾ

That's simple:
അത് സിംപിളാണ്:

```js
let ourPlanetName = "Earth";
```

Note, we could use a shorter name `planet`, but it might not be obvious what planet it refers to. It's nice to be more verbose. At least until the variable isNotTooLong.
കുറിപ്പ്, നമുക്ക് ഒരു ചെറിയ പേര് ഉപയോഗിക്കാം `planet`, എന്നാൽ അത് ഏത് ഗ്രഹത്തെയാണ് സൂചിപ്പിക്കുന്നത് എന്ന് വ്യക്തമല്ലായിരിക്കാം. കൂടുതൽ അർത്ഥം നൽകുന്നത് നല്ലതാണ്. കുറഞ്ഞത് വേരിയബിൾ വളരെ ദൈർഘ്യമേറിയതാവാതെ സൂക്ഷിക്കുക.

## The name of the current visitor
## നിലവിലെ സന്ദർശകന്റെ പേര്

```js
let currentUserName = "John";
```

Again, we could shorten that to `userName` if we know for sure that the user is current.
വീണ്ടും, നമുക്ക് അത് ചുരുക്കാം `userName` ഉപയോക്താവ് നിലവിലുള്ളതാണെന്ന് ഞങ്ങൾക്ക് ഉറപ്പുണ്ടെങ്കിൽ മാത്രം.
ആധുനിക എഡിറ്ററുകളും ഓട്ടോ-കബ്ളീട്ടും
Modern editors and autocomplete നീളമുള്ള വേരിയബിൾ പേരുകൾ എഴുതാൻ സഹായിക്കും. 3 വാക്കുകളുള്ള ഒരു പേര് കുഴപ്പമില്ല.

Modern editors and autocomplete make long variable names easy to write. Don't save on them. A name with 3 words in it is fine.

And if your editor does not have proper autocompletion, get [a new one](/code-editors).
നിങ്ങളുടെ എഡിറ്ററിന് ശരിയായ ഓട്ടോ-കബ്ളീട്ട് ഇല്ലെങ്കിൽ, പുതിയൊരെണ്ണം കണ്ടെത്തുക [a new one](/code-editors).
9 changes: 5 additions & 4 deletions 1-js/02-first-steps/04-variables/2-declare-variables/task.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
importance: 3
പ്രാധാന്യം: 3

---

# Giving the right name
# ശരിയായ പേര് നൽക്കുക

1. Create a variable with the name of our planet. How would you name such a variable?
2. Create a variable to store the name of a current visitor to a website. How would you name that variable?
1. നമ്മുടെ ഗ്രഹത്തിന്റെ പേര് ഉപയോഗിച്ച് ഒരു വേരിയബിൾ ഉണ്ടാക്കുക. അത്തരമൊരു വേരിയബിളിന് നിങ്ങൾ എങ്ങനെ പേര് നൽകും?

2.ഒരു വെബ്‌സൈറ്റിലെ നിലവിലെ സന്ദർശകന്റെ പേര് സംഭരിക്കുന്നതിന് ഒരു വേരിയബിൾ സൃഷ്‌ടിക്കുക. ആ വേരിയബിളിന് നിങ്ങൾ എങ്ങനെ പേര് നൽകും?
Loading

0 comments on commit 41982a9

Please sign in to comment.