achia
June 8, 2020, 10:52pm
1
Tell us what’s happening:
its not working
Your code so far
function reusableFunction() {
console.logs("Hello World");
}
Your browser information:
User Agent is: Mozilla/5.0 (X11; CrOS x86_64 12871.102.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.141 Safari/537.36
.
Challenge: Write Reusable JavaScript with Functions
Link to the challenge:
Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.
Hello~!
console.logs()
is not the same as console.log()
The instructions say:
Create a function called reusableFunction
which prints "Hi World"
to the dev console.
Call the function.
You have a couple of issues:
Your code does not log Hi World
You mispelled log
(no s
)
You did not call your function
I hope this helps!
achia
June 8, 2020, 10:55pm
4
it still doesnt work
funtion reusableFunction(){
console.log("Hi world");
}
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
Please use the “preformatted text” tool in the editor (</>
) to add backticks around text.
See this post to find the backtick on your keyboard.
Note: Backticks are not single quotes.
You have misspelled function
and the capitalization does not match the requested Hi World
.
Also, you still haven’t called your function yet. You’ve only defined it.
1 Like
Bugs happen. It’s part of learning to code.
1 Like
achia
June 8, 2020, 11:03pm
9
function reusableFunction() {
console.log("Hello World");
}
achia
June 8, 2020, 11:04pm
11
it still doesnt work when i redo them
Cool. It looks close. You’ve defined your function. Now you need to call your function.
// Function definition
function hiThere() {
console.log("Hi There!");
}
// Function call
hiThere();
When you call your function, you should compare the output to the requested output Hi World
.