r/javaScriptStudyGroup • • Apr 15 '21

JavaScript Study Topic: Functions in JavaScript

3 Upvotes

JavaScript Study Topic: Functions in JavaScript

A JavaScript function is a block of organized, reusable code that is defined to perform a single, relation action. A function is executed when someone calls the function with the name.

In JavaScript, functions are treated as first-class because they are treated as values. The example of treating function as values are -

  • We can assign a function to a variable

  • We can store functions in an array

  • A function can be passed to another function as an argument

  • A function can be assigned to a property of an object.

Here are the Blog and Video explaining me all the concepts you need to know.

Note - I am sharing all my JavaScript study notes here. Please provide your feedback if you see anything wrong or missing. Appreciate your help.


r/javaScriptStudyGroup • • Apr 07 '21

Node.js development with Docker and Docker Compose

Thumbnail
nodejsdesignpatterns.com
3 Upvotes

r/javaScriptStudyGroup • • Apr 06 '21

10 One-Liner Utility methods in TypeScript/JavaScript

Thumbnail
blog.decipher.dev
3 Upvotes

r/javaScriptStudyGroup • • Feb 23 '21

5 Git tricks every developer should know about

Thumbnail
js.plainenglish.io
3 Upvotes

r/javaScriptStudyGroup • • Feb 09 '21

Sorting array of objects, strings and numbers using JavaScript🔥

Thumbnail
tutorialstonight.com
3 Upvotes

r/javaScriptStudyGroup • • Feb 04 '21

Short video about Array includes method in javascript

Thumbnail
youtube.com
3 Upvotes

r/javaScriptStudyGroup • • Feb 03 '21

How To Deploy Your Node.js App On AWS With NGINX And SSL

Thumbnail
medium.com
3 Upvotes

r/javaScriptStudyGroup • • Jan 29 '21

join method in javascript

Thumbnail
youtube.com
3 Upvotes

r/javaScriptStudyGroup • • Jan 21 '21

Javascript basic piano project

Thumbnail
youtube.com
3 Upvotes

r/javaScriptStudyGroup • • Jan 19 '21

DOM Manipulation in JavaScript 🔥

Thumbnail
tutorialstonight.com
3 Upvotes

r/javaScriptStudyGroup • • Jan 19 '21

React js Chuck Norris Jokes Generator

Thumbnail
youtube.com
3 Upvotes

r/javaScriptStudyGroup • • Jan 17 '21

How to style elements using JavaScript 👨‍💻

Thumbnail
tutorialstonight.com
3 Upvotes

r/javaScriptStudyGroup • • Jan 14 '21

[Cheat Sheet ] JavaScript Object Functions Part 1

Thumbnail
htmlspacecode.com
3 Upvotes

r/javaScriptStudyGroup • • Jan 12 '21

Learn React by coding a simple Calculator App

Thumbnail
youtu.be
3 Upvotes

r/javaScriptStudyGroup • • Jan 11 '21

Learn Web Development - FREE Training

Thumbnail
ngninja.com
3 Upvotes

r/javaScriptStudyGroup • • Jan 11 '21

JavaScript Object Functions Cheat Sheet Part 2

Thumbnail
htmlspacecode.com
3 Upvotes

r/javaScriptStudyGroup • • Jan 05 '21

Javascript Interview Questions 2021

Thumbnail
youtube.com
3 Upvotes

r/javaScriptStudyGroup • • Jan 03 '21

What's the logic behind (auto-saved draft) using Javascript codes?

Thumbnail donnekt.com
3 Upvotes

r/javaScriptStudyGroup • • Dec 15 '20

This particular article is my solution to try and mock a particular external method (using jest mock method) in the test case for a simple example app. Hope this article saves time for a lot of fellow devs in the community!

Thumbnail
ovpv.me
3 Upvotes

r/javaScriptStudyGroup • • Nov 17 '20

Need help with this Javascript task. My teacher has allowed me to seek help online. I need help in the bold parts. Code is pasted below the question

3 Upvotes

What I have done is in the <script>

IST wants a prize draw quiz page for their website. The page has already been started. You are

required to complete it.

Open ISTDraw.html in your browser.

Users enter their choices, 1, 2, or 3, in the boxes with input ids: Answer1, Answer2, and Answer3

and click on “Test your answers”.

The correct answers for the quiz are:

1. International Ski Tours – (option 2)

2. Luxury accommodation – (option 3)

3. All the family – (option 2)

Using ISTDraw.html add the JavaScript code to achieve the following:

• When users click to submit their choices, the script must display an alert displaying the number of correct answers and suitable explanatory text

• When the alert is dismissed the number of correct answers must be displayed in the box with input id =“count” under the “Number of correct answers” label

• For 3 correct answers display the text, “Well done” at the id=“response” placeholder under the count box*.*

o the text “Enter draw” should appear at the id=“Enter” placeholder under the Prize Draw Quick Quiz heading

<html>

<body>

<h3>Prize Draw Quick Quiz</h3>

<!--Enter placeholder -->

<h3 id="Enter"></h3>

<h2>Enter your choices 1,2,or 3 in the answer boxes </h2>

</div><br>

What does IST stand for?<br>

1.International Snow Travel<br>

2. International Ski Tours<br>

3. International Ski Travel<br>

Answer 1.

<!--Answer1 input box -->

<input id="Answer1" type="number" ><br><br>

What sort of accommodation does IST provide?<br>

  1. Budget accommodation<br>

  2. Deluxe accommodation<br>

  3. Luxury accommodation<br>

Answer 2.

<!--Answer2 input box -->

<input id="Answer2" type="number" ><br><br>

Who does IST provide fun for?<br>

  1. Children<br>

  2. All the family<br>

  3. Adults<br>

Answer 3.

<!--Answer3 input box -->

<input id="Answer3" type="number" ><br><br>

<button type="button" onClick="myFunction()">Test your answers</button>

<br>

<p>Number of correct answers</p>

<!--count input box -->

<input id="count"type="number">

</p>

<!--reponse placeholder -->

<p id="response"> </p>

<SCRIPT LANGUAGE="JavaScript">

var result=0

function myFunction() {

var ans1=document.getElementById("Answer1").value

if (ans1=="") {alert("Please Answer Q1")}

else if (ans1==2) {result++}

}

function myFunction() {

var ans2=document.getElementById("Answer2").value

if (ans2=="") {alert("Please Answer Q2")}

else if (ans2==3) {result++}

}

function myFunction() {

var ans3=document.getElementById("Answer3").value

if (ans3=="") {alert("Please Answer Q3")}

else if (ans3==2) {result++}

}

function myFunction() {

alert(result)

</SCRIPT>

</body>

</html>


r/javaScriptStudyGroup • • Nov 13 '20

JavaScript interview prep (my app and website)

3 Upvotes

I have tried to collate most of the questions in this app - https://play.google.com/store/apps/details?id=gamesmint.com.jsone (it is free). Web version here - http://www.geekthrust.com/js.html.

Besides this these links will be very useful

  1. Large scale JS architecture - https://addyosmani.com/largescalejavascript/ and https://www.youtube.com/watch?v=b5pFv9NB9fs (must watch)

  2. MVC in native JS - https://alexatnet.com/model-view-controller-mvc-in-javascript/

  3. DS & Algo in JS - https://github.com/trekhleb/javascript-algorithms

  4. https://stackoverflow.com/questions/17718673/how-is-a-promise-defer-library-implemented (promise implementation)

  5. http://www.geekthrust.com/webappdesign.html.

Could guys be kind enough to provide feedback. Thanks


r/javaScriptStudyGroup • • Oct 25 '20

HTML2CANVAS || Take Screenshots Of Certain Div and Images using HTML2CANVAS

Thumbnail
youtube.com
3 Upvotes

r/javaScriptStudyGroup • • Oct 11 '20

Create stucky navbar using javascript

3 Upvotes

Creating Sticky / Fixed Navbar using Javascript is quite fun. Do watch the video to know more about it .
https://www.youtube.com/watch?v=qZYHaIeiKNM&t=12s


r/javaScriptStudyGroup • • Sep 02 '20

Noob question.

3 Upvotes

myString = "string string"

function stringSplitter(a){ return a.split(" "); }

console.log(stringSplitter(myString))

So im trying to make a function split a string where there are spaces. I get uncaught TypeError: name.split is not a function. What am I doing wrong??


r/javaScriptStudyGroup • • Aug 18 '20

How to trick an in built website clock into skipping days.

3 Upvotes

This may sound strange but I'm frazzled. So I'm trying to break this website for a game and it works by the days (unlocking as irl time goes on. ) Is there anyway to hack the website into skipping a day. Been trying for ages. It uses JavaScript.