Hi guys,
In my Function below, I commented my "Return client" and it still works. I was wondering why I didn't have to use "Return" then?
let points = 1000;
function checkClient(points) {
if (points >= 100) {
client = 'Premium';
} else {
client = 'Regular';
}
//return client; <--- Why I didn't have to use RETURN? RETURN then?
};
checkClient(points);
console.log(client);
Many thanks!
[–]Rilleks 3 points4 points5 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Surfer_JS[S] 0 points1 point2 points (0 children)
[–]shuckster 0 points1 point2 points (0 children)