diff --git a/README.md b/README.md deleted file mode 100644 index 42a65b9..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# module4-assignment -javascript and html diff --git a/Sanke b/Sanke deleted file mode 100644 index 356524f..0000000 --- a/Sanke +++ /dev/null @@ -1,12 +0,0 @@ -import pygame -pygame.init() -dis=pygame.display.set_mode((400,300)) -pygame.display.update() -pygame.display.set_caption('Snake game by Edureka') -game_over=False -while not game_over: - for event in pygame.event.get(): - print(event) #prints out all the actions that take place on the screen - -pygame.quit() -quit() diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..c419263 --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-cayman \ No newline at end of file diff --git a/index.md b/index.md new file mode 100644 index 0000000..2a78a0f --- /dev/null +++ b/index.md @@ -0,0 +1,37 @@ +## Welcome to GitHub Pages + +You can use the [editor on GitHub](https://github.com/harshgithub01/module4-assignment/edit/gh-pages/index.md) to maintain and preview the content for your website in Markdown files. + +Whenever you commit to this repository, GitHub Pages will run [Jekyll](https://jekyllrb.com/) to rebuild the pages in your site, from the content in your Markdown files. + +### Markdown + +Markdown is a lightweight and easy-to-use syntax for styling your writing. It includes conventions for + +```markdown +Syntax highlighted code block + +# Header 1 +## Header 2 +### Header 3 + +- Bulleted +- List + +1. Numbered +2. List + +**Bold** and _Italic_ and `Code` text + +[Link](url) and ![Image](src) +``` + +For more details see [GitHub Flavored Markdown](https://guides.github.com/features/mastering-markdown/). + +### Jekyll Themes + +Your Pages site will use the layout and styles from the Jekyll theme you have selected in your [repository settings](https://github.com/harshgithub01/module4-assignment/settings). The name of this theme is saved in the Jekyll `_config.yml` configuration file. + +### Support or Contact + +Having trouble with Pages? Check out our [documentation](https://docs.github.com/categories/github-pages-basics/) or [contact support](https://github.com/contact) and we’ll help you sort it out. diff --git a/module4-solution/SpeakGoodBye.js b/module4-solution/SpeakGoodBye.js new file mode 100644 index 0000000..7e12d2d --- /dev/null +++ b/module4-solution/SpeakGoodBye.js @@ -0,0 +1,9 @@ +(function(window) { + var speakWord = "Good Bye"; + var speakBye = function (name) { + console.log(speakWord + " " + name); + } + + window.speakBye = speakBye; + +})(window); \ No newline at end of file diff --git a/module4-solution/SpeakHello.js b/module4-solution/SpeakHello.js new file mode 100644 index 0000000..b3f8f18 --- /dev/null +++ b/module4-solution/SpeakHello.js @@ -0,0 +1,9 @@ +(function(window) { + var speakWord = "Hello"; + var speakHello = function (name) { + console.log(speakWord + " " + name); + } + + window.speakHello = speakHello; + +})(window); \ No newline at end of file diff --git a/module4-solution/index.html b/module4-solution/index.html new file mode 100644 index 0000000..65b39d1 --- /dev/null +++ b/module4-solution/index.html @@ -0,0 +1,24 @@ + + + + + Module 4 Solution Starter + + + + + + + + +

Module 4 Solution

+

Head over to the console to see the output

+ + \ No newline at end of file diff --git a/module4-solution/script.js b/module4-solution/script.js new file mode 100644 index 0000000..501e11d --- /dev/null +++ b/module4-solution/script.js @@ -0,0 +1,16 @@ +(function () { + +var names = ["Yaakov", "John", "Jen", "Jason", "Paul", "Frank", "Larry", "Paula", "Laura", "Jim"]; + +for (var i = 0; i < names.length; i++) { + var firstLetter = names[i].charAt(0).toLowerCase(); + + if (firstLetter === 'j') { + speakBye(names[i]); + } + else { + speakHello(names[i]); + } +} + +})(); \ No newline at end of file