find number in array js
array.include(numberWhichYouWantToFInd);
// if present it will return true otherwise false
find number in array js
array.include(numberWhichYouWantToFInd);
// if present it will return true otherwise false
Find a number in an array
arr = [0,1,2,3,4,5,6,7,8,9]
# A dictionary to check true or false
check = {True: "YES", False: "NO"}
# Define the function
def findNumber(arr, k):
# print the dictionary with the built in method for searching array elements
print(check[k in arr])
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us