Skip to content

Instantly share code, notes, and snippets.

View VIRGO96's full-sized avatar
💭
Working as Javascript Developer

MM VIRGO96

💭
Working as Javascript Developer
  • RCS
  • islamabad
View GitHub Profile
@VIRGO96
VIRGO96 / Test Answers
Created February 6, 2019 13:33
Test Answers for ITWal
Question 1
indexOf returns the integer value
and when you attach ! with it it returns true
so instead of checking for true or false we can
check the integers
function myFunction() {
var str="Superman OS running";
if (str.toLowerCase().indexOf('superman') == -1) {
console.log('String does not contain superman');