Here’s my reasoning, working from left to right as explained in the instructions:
// t is in javascript but it’s not in the right place : 1
// y is not in javascript: 0
// p is in javascript but it’s not in the right place: 1
// e is not in javascript: 0
// s is in javascript and it’s in the right place: 2
// c is in javascript and it’s in the right place: 2
// r is in javascript and it’s in the right place: 2
// i is in javascript and it’s in the right place: 2
// p is in javascript but the one p in that word has already been used: 0
// t is in javascript but the one t in that word has already been used: 0