Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Hello WorLd

This is an aw esome javaScript program that has like a bunch of cool functions and stuff.
This is an awesome javaScript program. It has two working functions.

## helloWorld()

spits out the text 'Hello, World" to the console.
This function logs the text "Hello, World" to the console.

## helloName(name)

takes a var and then it says "Hello, Ann" if name is "Ann".
This function takes a perameter and then it says "Hello, Ann" if name is equal to "Ann".

## Instrcutions

Expand Down
5 changes: 3 additions & 2 deletions helloworld.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
function helloWorld(){
console.print("Hello, World"); //I don't know why this doesn't work.
console.log("Hello, World"); //I don't know why this doesn't work.
}

function helloName(name){
console.log(`Hello, $name`); //Idk why it prints out "Hello, $name" instead of "Hello, Ann"
console.log(`Hello, ${name}`); //Idk why it prints out "Hello, $name" instead of "Hello, Ann"
}

//Tried to invoke both functions here but I get an error :(
helloWorld()
helloName("Ann")