Hi I am on lesson “Booleans and Comparison Operators” and doing the section on Ternary Operator.
link : https://www.codecademy.com/courses/learn-php/lessons/booleans-and-comparison-operators/exercises/ternary-operator?action=resume_content_item
This is the error I am getting.
Your function should
return
a string. We tested your function and expected a string return value but instead it returned a value of type NULL
This is my code:
<?php
namespace Codecademy;
function ternaryCheckout($num)
{
$num <= 12 ? "express lane" : "regular lane";
};
It says its not getting my return string. I thought this seemed like the right way to do this, but it is still giving me error. Maybe there is an issue with my syntax, that I am not seeing. Could someone help me with this?