diff --git a/config/config.js b/config/config.js
index ebffa075..2e3f4d79 100644
--- a/config/config.js
+++ b/config/config.js
@@ -13,9 +13,11 @@ const postsUrl = `${apiVerUrl}/posts`;
const allPostsUrl = "api/posts";
const postUser = `${apiVerUrl}/posts-by-user`;
const eventsUrl = `${apiVerUrl}/events`;
+const adminEventReviewUrl = `${apiVerUrl}/admin/event`;
const eventIdUrl = `${apiVerUrl}/event`;
const eventSlugUrl = `${apiVerUrl}/event-by-slug`;
const createEventUrl = `${apiVerUrl}/admin/event`;
+const eventRequestUrl = `${apiVerUrl}/event`
const changeStatusUrl = "api/user/post";
const subscribeUrl = "api/subscribe";
const loginUrl = `${apiVerUrl}/signin`;
@@ -46,8 +48,14 @@ const logoutUrl = `${apiVerUrl}/logout`;
const setVoteUrl = `${apiVerUrl}/post-vote`;
const getVoteUrl = `${apiVerUrl}/post-votes`;
const getVoteTypeUrl = `${apiVerUrl}/post-vote-by-user`;
+const getYearlyActivities = `${apiVerUrl}/user-activities`;
+const getFollowersUrl = `${apiVerUrl}/followers`
+const addorRemoveFollowers = `${apiVerUrl}/follow`
+const isFollwing = `${apiVerUrl}/follower`
+const leaderBoardUrl = `${apiVerUrl}/leader-board`;
const configVars = {
+ leaderBoardUrl,
baseUrl,
bookEventUrl,
allPostUrl,
@@ -67,6 +75,7 @@ const configVars = {
loginUrl,
userUrl,
verificationMail,
+ adminEventReviewUrl,
clientUrl,
s3Url,
authUrl,
@@ -80,6 +89,7 @@ const configVars = {
createEventUrl,
eventIdUrl,
changeStatusUrl,
+ eventRequestUrl,
createEventUrl,
subscribeUrl,
editorUrl,
@@ -94,6 +104,10 @@ const configVars = {
changePasswordUrl,
skillUrl,
publishedPostsUrl,
+ getYearlyActivities,
+ getFollowersUrl,
+ addorRemoveFollowers,
+ isFollwing,
// publishedPostsCountUrl,
logoutUrl
};
diff --git a/courses/javascript/arithmetic-operators.md b/courses/javascript/arithmetic-operators.md
index 8510fde6..3fbf5d80 100644
--- a/courses/javascript/arithmetic-operators.md
+++ b/courses/javascript/arithmetic-operators.md
@@ -3,33 +3,7 @@ title: "Introduction To Javascript"
subheading: "Arithmetic Operators"
next: "prototypes"
prev: "if-condition"
-contentOnly: false
-testCase: [
- {
- id: 1,
- case: ["let a = 5, b = 2;", "let a = 5, b = 2",let a = 5; let b = 2;],
- hint: "a should have a value of 5 and b should have a value of 2",
- isCorrect: false
- },
- {
- id: 2,
- case: ['let result = a + b;',"let result = a + b"],
- hint: "result should have the value after performing ADD on a and b",
- isCorrect: false
- },
- {
- id: 3,
- case: ["result = a * b;", "result = a * b"],
- hint: "result should have the value after performing Multiplication on a and b",
- isCorrect: false
- },
- {
- id: 4,
- case: ["result = a % b;", "result = a % b"],
- hint: "result should have the value after performing Remainder on a and b",
- isCorrect: false
- }
- ]
+contentOnly: true
---
We know many operators from school. They are things like addition `+`, multiplication `*`, subtraction `-`, and so on.
@@ -120,10 +94,6 @@ console.log(5 % 2); // 1, a remainder of 5 divided by 2
## Complete the tasks below:
-- Create two variables `a` and `b` and assign values 5 and 2 respectively.
+
-- Perform an addition operation on `a` and `b` and assign the value to a variable `result`.
-
-- Perform a multiplication operation on `a` and `b` and assign the value to a variable `result`.
-
-- Perform a modulus operation on `a` and `b` and assign the value to a variable `result`.
+Create an HTML form for arithmetic calculations.
diff --git a/courses/javascript/basic-functions.md b/courses/javascript/basic-functions.md
new file mode 100644
index 00000000..b7b0d8ba
--- /dev/null
+++ b/courses/javascript/basic-functions.md
@@ -0,0 +1,83 @@
+---
+title: "Introduction to Javascript function"
+subheading: "Function"
+prev: "prototypes"
+next: ""
+contentOnly: true
+testCase:
+ [
+ {
+ id: 1,
+ case: ["function addTwoNumbers(num1, num2) {"],
+ hint: "Please re check the function syntax and code formatting.",
+ isCorrect: false
+ },
+ {
+ id: 2,
+ case: ["const sum = num1 + num2;", const sum = num1 + num2"],
+ hint: "Please re check the code and formatting.",
+ isCorrect: false
+ },
+ {
+ id: 3,
+ case: ["return sum;", "return sum"],
+ hint: "Please re check the code and formatting.",
+ isCorrect: false
+ },
+ {
+ id: 4,
+ case: ["}"],
+ hint: 'Please close the function by "}" and check code formatting.',
+ isCorrect: false
+ },
+ {
+ id: 5,
+ case:
+ [
+ "console.log(addTwoNumbers(5, 6));",
+ "console.log(addTwoNumbers(5,6))"
+ ],
+ hint: "Please check the syntax and code formatting",
+ isCorrect: false
+ }
+ ]
+---
+
+A `function`(a.k.a method) is basically a set of instructions that performs a certain task. It can receive inputs and can also return values to where the function has been called.
+
+## Functions in JavaScript
+
+In Javascript, a function is declared using the `function` keyword. For example:
+
+```javascript
+function printText() {
+ // function body
+ console.log("Hello world");
+}
+
+printText(); // Hello world!
+```
+
+From the above code snippet a function consist of :
+
+- The name of the function **_printText_**.
+
+- The function body enclosed in curly brackets, which contains the JavaScript statements that describes the function
+
+## A function can return values as well
+
+The `return` keyword is used to return a value from a function. Let's see an example:
+
+```javascript
+function multiplyTen() {
+ return 10 * 10;
+}
+const num = multiplyTen();
+console.log(num); // 100
+```
+
+## Complete the task below
+
+- Create a button using html
+- create a function thatb display an alert box with some messages.
+- Add click event handler for the button to call the function
diff --git a/courses/javascript/comparisons.md b/courses/javascript/comparisons.md
index 81947df2..53865af4 100644
--- a/courses/javascript/comparisons.md
+++ b/courses/javascript/comparisons.md
@@ -3,39 +3,7 @@ title: "Introduction To Javascript"
subheading: "Comparisons"
next: "prototypes"
prev: "arithmetic-operators"
-contentOnly: false
-testCase: [
- {
- id: 1,
- case: ["true"],
- hint: "True",
- isCorrect: false
- },
- {
- id: 2,
- case: ["false"],
- hint: "False",
- isCorrect: false
- },
- {
- id: 3,
- case: ["true"],
- hint: "True",
- isCorrect: false
- },
- {
- id: 4,
- case: ["false"],
- hint: "False",
- isCorrect: false
- },
- {
- id: 5,
- case: ["false"],
- hint: "False",
- isCorrect: false
- },
-]
+contentOnly: true
---
We know many comparison operators from maths.
@@ -57,16 +25,16 @@ All comparison operators return a boolean value:
### Example
```javascript
-alert( 2 > 1 ); // true (correct)
-alert( 2 == 1 ); // false (wrong)
-alert( 2 != 1 ); // true (correct)
+alert(2 > 1); // true (correct)
+alert(2 == 1); // false (wrong)
+alert(2 != 1); // true (correct)
```
A comparison result can be assigned to a variable, just like any value:
```javascript
let result = 5 > 4; // assign the result of the comparison
-alert( result ); // true
+alert(result); // true
```
## String Comparison
@@ -95,9 +63,9 @@ In the example above, for comparison, string '2' is typecasted to number 2 and t
The value undefined shouldn’t be compared to other values:
```javascript
-alert( undefined > 0 ); // false (1)
-alert( undefined < 0 ); // false (2)
-alert( undefined == 0 ); // false (3)
+alert(undefined > 0); // false (1)
+alert(undefined < 0); // false (2)
+alert(undefined == 0); // false (3)
```
We get these results because:
@@ -111,8 +79,10 @@ We get these results because:
What will be the result for these expressions?
-- 5 > 4
-- "apple" > "pineapple"
-- "2" > "12"
-- "2" > 12
-- 5 > undefined
\ No newline at end of file
+- Use all the methods in chapter one to display the output of below comparisons [refer here..](hello-world)
+
+ - 5 > 4
+ - "apple" > "pineapple"
+ - "2" > "12"
+ - "2" > 12
+ - 5 > undefined
diff --git a/courses/javascript/hello-world.md b/courses/javascript/hello-world.md
index da49681f..8ad8ea3f 100644
--- a/courses/javascript/hello-world.md
+++ b/courses/javascript/hello-world.md
@@ -1,9 +1,8 @@
---
-title: "Introduction To Javascript"
-subheading: "Hello World!"
+title: "Hello World"
next: "variables"
prev: "introduction"
-contentOnly: false
+contentOnly: true
testCase: [
{
id: 1,
@@ -35,10 +34,12 @@ console.log("hi");