Your code so far
function testSize(num) {
// Only change code below this line
if (num < 5) {
return “Tiny”
} else if (num < 10) {
return “Small”
} else if (num < 15) {
return “Medium”
} else if (num < 20) {
return “Large”
} else {
return “Huge”
// Only change code above this line
}
// Change this value to test
testSize(15);
function testSize(num) {
// Only change code below this line
if (num < 5) {
return “Tiny”
} else if (num < 10) {
return “Small”
} else if (num < 15) {
return “Medium”
} else if (num < 20) {
return “Large”
} else {
return “Huge”
// Only change code above this line
}
// Change this value to test
testSize(15);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36.
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.
See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.
that’s not your whole code, it may be you are missing a bracket somewhere. I don’t know without seeing your code. check that all opening brackets have a closing bracket
in your first post you had the code automatically included. now you changed your code. I don’t know what your code is. those are the instructions to add a formatted block code in your post so that you can show your new code.
still, my advice of last post is still valid, your brackets could be an issue.
<p>function testSize(num) {
// Only change code below this line
if (num < 5) {
return "Tiny"
} else if (num < 10) {
return "Small"
} else if (num < 15) {
return "Medium"
} else if (num < 20) {
return "Large"
} else {
return "Huge"
// Only change code above this line
}
// Change this value to test
testSize(15); </p>