diff --git a/_layouts/website/languages.html b/_layouts/website/languages.html index ab009668..d651b084 100644 --- a/_layouts/website/languages.html +++ b/_layouts/website/languages.html @@ -23,9 +23,13 @@ Learn JavaScript: Beginners Edition - Suman Kunwar + + Suman Kunwar + ASIN: B0C53J11V7 + This work is licensed under a Apache 2.0 License (Apache 2.0). + Based on a work at javascript.sumankunwar.com.np. - Web VersionLAST UPDATED ON 2023-01-05 + Web VersionLAST UPDATED ON 2023-08-20 First Edition @@ -53,6 +57,9 @@

{{ "LANGS_CHOOSE"|t }}

{% for lang in languages.list %}
  • {{ lang.title }} + + +
  • {% endfor %} diff --git a/book.json b/book.json index 7897687b..eecd45d9 100644 --- a/book.json +++ b/book.json @@ -24,7 +24,8 @@ "favicon-custom", "chapter-fold", "hide-published-with", - "edit-link" + "edit-link", + "ace-editor" ], "pdf": { "pageNumbers": true, diff --git a/en/exercises/concatenation.md b/en/exercises/concatenation.md index e35ae50d..dc7c6662 100644 --- a/en/exercises/concatenation.md +++ b/en/exercises/concatenation.md @@ -39,3 +39,6 @@ const icon = "👋"; ### 💡 Hints: - Visit the [concatenation](../strings/concat.md) chapter of strings for more info about string concatenation. + +{% aceeditor compilerTitle="Try it!" %} +{% endaceeditor %} \ No newline at end of file diff --git a/en/exercises/conditional-statements.md b/en/exercises/conditional-statements.md index 3ff23994..2b7a2396 100644 --- a/en/exercises/conditional-statements.md +++ b/en/exercises/conditional-statements.md @@ -23,3 +23,6 @@ Conditional logic is vital in programming as it makes sure that the program work ### 💡 Hints: - Visit the [conditional logic](../conditional/) chapter to understand how to use conditional logic and conditional statements. + +{% aceeditor compilerTitle="Try it!" %} +{% endaceeditor %} \ No newline at end of file diff --git a/en/exercises/console.md b/en/exercises/console.md index c0557553..3b5053c9 100644 --- a/en/exercises/console.md +++ b/en/exercises/console.md @@ -57,3 +57,6 @@ console.log(age === 50); * Visit the [variable](../basics/variables.md) chapter to understand more about variables. * Visit the [operators](https://javascript.sumankunwar.com.np/en/numbers/operators.html) page to know the possible operators you can use. + +{% aceeditor compilerTitle="Try it!" %} +{% endaceeditor %} \ No newline at end of file diff --git a/en/exercises/constants.md b/en/exercises/constants.md index 73c4c20b..50f54dcf 100644 --- a/en/exercises/constants.md +++ b/en/exercises/constants.md @@ -34,3 +34,6 @@ const VERSION = "1.2"; ### 💡 Hints: - Visit the [Variables](../basics/variables.md) chapter for more info about const and also look for "_TypeError assignment to constant variable_" in search engines to learn a fix. + +{% aceeditor compilerTitle="Try it!" %} +{% endaceeditor %} \ No newline at end of file diff --git a/en/exercises/fizzbuzz-problem.md b/en/exercises/fizzbuzz-problem.md index da074d9a..f14bb3c6 100644 --- a/en/exercises/fizzbuzz-problem.md +++ b/en/exercises/fizzbuzz-problem.md @@ -42,3 +42,6 @@ The _FizzBuzz_ problem is one of the commonly asked questions, here one has to p ### 💡 Hints: * Visit the [loops](../loops/) chapter to understand how the loop works. + +{% aceeditor compilerTitle="Try it!" %} +{% endaceeditor %} \ No newline at end of file diff --git a/en/exercises/functions.md b/en/exercises/functions.md index 8f4612b1..85fe4d93 100644 --- a/en/exercises/functions.md +++ b/en/exercises/functions.md @@ -18,3 +18,6 @@ A function is a block of code designed to perform a specific task and executed w ### 💡 Hints: - Visit the [functions](../functions/) chapter to understand functions and how to create them. + +{% aceeditor compilerTitle="Try it!" %} +{% endaceeditor %} \ No newline at end of file diff --git a/en/exercises/get-the-titles.md b/en/exercises/get-the-titles.md index 7ef6b553..afc3049e 100644 --- a/en/exercises/get-the-titles.md +++ b/en/exercises/get-the-titles.md @@ -29,3 +29,5 @@ const books = [ * Visit the [arrays](../arrays/) and [objects](../objects/) chapter to understand how the array and object work. +{% aceeditor compilerTitle="Try it!" %} +{% endaceeditor %} \ No newline at end of file diff --git a/en/exercises/multiplication.md b/en/exercises/multiplication.md index e7e494f9..d931fb5d 100644 --- a/en/exercises/multiplication.md +++ b/en/exercises/multiplication.md @@ -24,3 +24,6 @@ Here, we stored the product of `3 * 2` into a `resultingValue` variable. ### 💡 Hints: - Visit the [Basic Operators](../numbers/operators.md) chapter to understand the mathematical operations. + +{% aceeditor compilerTitle="Try it!" %} +{% endaceeditor %} \ No newline at end of file diff --git a/en/exercises/objects.md b/en/exercises/objects.md index 012b27f7..a9a55a26 100644 --- a/en/exercises/objects.md +++ b/en/exercises/objects.md @@ -45,3 +45,6 @@ let family = { * Visit the [objects](../objects/) chapter to understand how the object work. * You can get `luckyNumbers` from each person object inside the family object. * Once you get each array just loop over it adding every element and then add each sum of the 3 family members. + +{% aceeditor compilerTitle="Try it!" %} +{% endaceeditor %} \ No newline at end of file diff --git a/en/exercises/user-input-variables.md b/en/exercises/user-input-variables.md index 66bad27b..1adfe798 100644 --- a/en/exercises/user-input-variables.md +++ b/en/exercises/user-input-variables.md @@ -15,3 +15,6 @@ In JavaScript, we can take input from users and use it as a variable. One doesn' * The content of a variable is determined by the user's inputs. The `prompt()` method saves the input value as a string. * You will need to make sure that the string value is converted into an integer for calculations. * Visit the [Basic Operators](../numbers/operators.md) chapter for the type conversion of `string` to `int`. + +{% aceeditor compilerTitle="Try it!" %} +{% endaceeditor %} \ No newline at end of file diff --git a/package.json b/package.json index c1ccf190..c693a932 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "devDependencies": { "@honkit/honkit-plugin-ga": "^1.0.1", "cz-conventional-changelog": "^3.3.0", + "gitbook-plugin-ace-editor": "github:sumn2u/gitbook-plugin-ace-editor", "gitbook-plugin-chapter-fold": "^0.0.4", "gitbook-plugin-edit-link": "^2.0.2", "gitbook-plugin-exercises": "^3.0.0", @@ -13,10 +14,10 @@ "gitbook-plugin-hide-published-with": "0.0.1", "gitbook-plugin-hints": "^1.0.2", "gitbook-plugin-intopic-toc": "^1.0.6", - "gitbook-plugin-sharing": "https://github.com/sumn2u/plugin-sharing.git", - "gitbook-plugin-sidebar-ad": "https://github.com/sumn2u/gitbook-plugin-sidebar-ad.git", + "gitbook-plugin-sharing": "github:sumn2u/plugin-sharing", + "gitbook-plugin-sidebar-ad": "github:sumn2u/gitbook-plugin-sidebar-ad", "gitbook-plugin-sitemap": "^1.2.0", - "gitbook-plugin-theme-creative": "https://github.com/sumn2u/gitbook-plugin-theme-creative.git", + "gitbook-plugin-theme-creative": "github:sumn2u/gitbook-plugin-theme-creative", "honkit": "^4.0.4", "honkit-plugin-i18nsettings": "^1.0.0" },