Skip to content

Instantly share code, notes, and snippets.

Working as Javascript Developer

Dawood Ahmed VIRGO96

Working as Javascript Developer
  • RCS
  • islamabad
View GitHub Profile
VIRGO96 / Test Answers
Created Feb 6, 2019
Test Answers for ITWal
View Test Answers
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');