Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
The last code block has this spec. Closing.
So calling two separate where-filters is a logical AND, while combining two where-filters in one where-call is an OR?
// SELECT studentName, teacherName FROM teachers, students WHERE teachers.teacherId = students.tutor AND tutor = 1
query().select(student).from(teachers, students).where(teacherJoin).where(tutor1).execute(); //[{"studentName":"Michael","teacherName":"Peter"}] <- AND filter
// SELECT * FROM number WHERE number < 3 OR number > 4
query().select().from(numbers).where(lessThan3, greaterThan4).execute(); //[1, 2, 5, 7] <- OR filter
The last test from Numbers tests. It uses two conditions in where statements as logical OR instead of logical AND.
Please update the description of the task accordingly.
A Functional Programming kata with array mutation!
That's weird.
Don't waste your time on it!
More better now ;-)
It can be dangerous in this case if, for example, you are executing this code on your server based on user input.
its only dangerous when missusing it :) often peapole dont even know that they us it, because its hidden in other functions ;)
This is not a JS problem. It is a floating point problem, it happens on other languages.
just a try, for
0.1+0.2=0.3
but it doesn't work
You should not be using eval, it is dangerous.
It's not perfect ;-)
Try that: