Skip to content

Program to explain functions in JS#380

Merged
t2013anurag merged 3 commits intohacktoberfest17:masterfrom
shubham0109:functions_in_JS
Oct 18, 2017
Merged

Program to explain functions in JS#380
t2013anurag merged 3 commits intohacktoberfest17:masterfrom
shubham0109:functions_in_JS

Conversation

@shubham0109
Copy link
Copy Markdown
Contributor

This pull request fixes #30

@@ -0,0 +1,18 @@
<html>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move the file to functions directory, and rename the file to functions_in_js.html.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@t2013anurag I guess there's no functions directory right now. Do you want me to create a functions directory and push the JS file into it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shubham0109 - yes you can create one,

Comment thread functions in JS/main.js Outdated
@@ -0,0 +1,57 @@

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move the file to functions directory, and rename the file to functions_in_js_main.html.

Comment thread functions in JS/main.js Outdated
}
var rupees = convertToINR(dollars); // Here the dollars refer to the global dollar variable, although inside the function
// it is changed locally
// outside the val of dollars is still 15 No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a new line,

Comment thread functions in JS/index.html Outdated

</body>

</html> No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a new line.

<body>
<h1>
FUNCTIONS IN JS
</h1>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove all extra lines from the code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@t2013anurag Here are you suggesting to remove all the white spaces or should I shorten my code?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra new lines., use only one return statement in code.

@t2013anurag t2013anurag merged commit b3ed813 into hacktoberfest17:master Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write a program to explain the use of functions?

2 participants