Category "conditional"

Can we write IF statement without else in javascript

I wrote some code to create an simple todo app in angular js. I have the following function code to remove the tasks from the list. Javascript code $scope.del

How to break out of a foreach once a condition is met?

I have a situation where when dealing with an object I generally use a foreach to loop through it like this: foreach ($main_object as $key=>$small_object) {